Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-07-17 22:02:26 -0400
committerSergey Prigogin2011-07-17 22:07:56 -0400
commitd3264a74180ab0306d5dd217da409bf309031ff5 (patch)
treed155c3f7bcd6518be1b11bb78421ae86f61c6dd7 /codan/org.eclipse.cdt.codan.checkers
parent21e056c85659a76f88f4a26de0e0704c9ed1756a (diff)
downloadorg.eclipse.cdt-d3264a74180ab0306d5dd217da409bf309031ff5.tar.gz
org.eclipse.cdt-d3264a74180ab0306d5dd217da409bf309031ff5.tar.xz
org.eclipse.cdt-d3264a74180ab0306d5dd217da409bf309031ff5.zip
Removed an invalid exemption for abstract classes.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.checkers')
-rw-r--r--codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
index f4e365cd03..24fb21b8a4 100644
--- a/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
+++ b/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/NonVirtualDestructor.java
@@ -8,6 +8,7 @@
* Contributors:
* Alena Laskavaia - initial API and implementation
* Patrick Hofer [bug 315528]
+ * Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.codan.internal.checkers;
@@ -83,11 +84,7 @@ public class NonVirtualDestructor extends AbstractIndexAstChecker {
}
ICPPMethod virtualMethod = null;
for (ICPPMethod method : classType.getAllDeclaredMethods()) {
- if (method.isPureVirtual()) {
- // Class has at least one pure virtual method, it is abstract
- // and cannot be instantiated.
- return PROCESS_SKIP;
- } else if (method.isVirtual() && !method.isDestructor()) {
+ if (!method.isDestructor() && method.isVirtual()) {
virtualMethod = method;
}
}

Back to the top