diff options
author | Nathan Ridge | 2015-11-26 19:43:50 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2015-11-29 22:48:21 +0000 |
commit | 5cd555717bd08a896a25bc5e6d7d95972d2f3f8f (patch) | |
tree | 3917616edd98f6fa17f4440f2d88527ca99b0a7b /codan | |
parent | 56635a1b57a66f8fe1e04512efcf258fc8052c51 (diff) | |
download | org.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.java | 12 |
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 cfe7cc23f09..fb3fc76ad8e 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 |