Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorNathan Ridge2015-11-26 14:43:50 -0500
committerGerrit Code Review @ Eclipse.org2015-11-29 17:48:21 -0500
commit5cd555717bd08a896a25bc5e6d7d95972d2f3f8f (patch)
tree3917616edd98f6fa17f4440f2d88527ca99b0a7b /codan
parent56635a1b57a66f8fe1e04512efcf258fc8052c51 (diff)
downloadorg.eclipse.cdt-5cd555717bd08a896a25bc5e6d7d95972d2f3f8f.tar.gz
org.eclipse.cdt-5cd555717bd08a896a25bc5e6d7d95972d2f3f8f.tar.xz
org.eclipse.cdt-5cd555717bd08a896a25bc5e6d7d95972d2f3f8f.zip
Bug 479638 - Cache the result of EvalBinding.isConstantExpression()
This helps avoid infinite recursion when a variable's initializer references itself. Change-Id: I4667536ebbefd2008afe9003617092a0a5693db0 Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
index cfe7cc23f0..fb3fc76ad8 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/core/internal/checkers/ReturnCheckerTest.java
@@ -417,7 +417,17 @@ public class ReturnCheckerTest extends CheckerTestCase {
// }
public void testSelfReferencingVariable_452325() throws Exception {
// Just check that codan runs without any exceptions being thrown.
- checkSampleAbove();
+ checkSampleAboveCpp();
+ }
+
+ // int bar(int x) { return x; }
+ // int foo() { // error
+ // int waldo = bar(waldo);
+ // if (bar(waldo));
+ // }
+ public void testSelfReferencingVariable_479638() throws Exception {
+ // Just check that codan runs without any exceptions being thrown.
+ checkSampleAboveCpp();
}
// int foo(int x) { // error

Back to the top