Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorSergey Prigogin2011-05-10 15:44:49 -0400
committerSergey Prigogin2011-05-10 15:44:49 -0400
commit2ba3a82120fdfcae8cf579a772e6d42ed8033fdc (patch)
treeba85c10e801ea4f894ffc6e743d074f6e7d00a36 /codan
parentaf28c6569cf267ca1d78836bb6dfe1d96f4e24bb (diff)
downloadorg.eclipse.cdt-2ba3a82120fdfcae8cf579a772e6d42ed8033fdc.tar.gz
org.eclipse.cdt-2ba3a82120fdfcae8cf579a772e6d42ed8033fdc.tar.xz
org.eclipse.cdt-2ba3a82120fdfcae8cf579a772e6d42ed8033fdc.zip
Bug 326269 - Checker for instantiation of an abstract class. Patch by Anton Gorenkov.
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AbstractClassInstantiationCheckerTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AbstractClassInstantiationCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AbstractClassInstantiationCheckerTest.java
index a5f9fef290..d9fda5899c 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AbstractClassInstantiationCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/AbstractClassInstantiationCheckerTest.java
@@ -228,4 +228,20 @@ public class AbstractClassInstantiationCheckerTest extends CheckerTestCase {
loadCodeAndRun(getAboveComment());
checkErrorLines(4);
}
+
+ // class A {
+ // public:
+ // virtual ~A() = 0;
+ // };
+ //
+ // class B : public A {
+ // public:
+ // virtual ~B() {}
+ // };
+ //
+ // B b;
+ public void testPureVirtualDestructorOverride() {
+ loadCodeAndRun(getAboveComment());
+ checkNoErrors();
+ }
}

Back to the top