Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorNathan Ridge2013-09-05 01:09:43 -0400
committerSergey Prigogin2013-09-05 20:15:50 -0400
commit62c4e62ff3f6a06da21c4df2cee2e9acc284449f (patch)
tree7d7447a94a16826d07d27381701343ebf73f79d5 /codan
parent499bc0f1a7709a0d544a43b168ca2dd56fade8e9 (diff)
downloadorg.eclipse.cdt-62c4e62ff3f6a06da21c4df2cee2e9acc284449f.tar.gz
org.eclipse.cdt-62c4e62ff3f6a06da21c4df2cee2e9acc284449f.tar.xz
org.eclipse.cdt-62c4e62ff3f6a06da21c4df2cee2e9acc284449f.zip
Bug 416284 - Unsafe method call, using nested templates
Change-Id: I08732af62f43c03f362d4602736ef6b8e0f227e9 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com> Reviewed-on: https://git.eclipse.org/r/16147 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
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 c9bd97f9f2..aa705df443 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
@@ -331,4 +331,20 @@ public class AbstractClassInstantiationCheckerTest extends CheckerTestCase {
loadCodeAndRun(getAboveComment());
checkNoErrors();
}
+
+ // struct N {
+ // int node;
+ // };
+ //
+ // template <typename T>
+ // struct List {
+ // template <int T::*>
+ // struct Base {};
+ // };
+ //
+ // List<N>::Base<&N::node> base;
+ public void testUnsafeMethodCallException_bug416284() throws Exception {
+ // Just check that codan runs without any exceptions being thrown.
+ loadCodeAndRun(getAboveComment());
+ }
}

Back to the top