Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2017-05-14 00:43:56 +0000
committerMarc-André Laperle2017-05-26 15:47:09 +0000
commit35d0e13240e5b063746c8cd2e3e6e52553e7b8b4 (patch)
treebd3be8801ae98abf8f459575cd30c2e214e05f22 /core/org.eclipse.cdt.core.tests
parentfb61407d48fc01b1c371baaac5cd933da6becc9b (diff)
downloadorg.eclipse.cdt-35d0e13240e5b063746c8cd2e3e6e52553e7b8b4.tar.gz
org.eclipse.cdt-35d0e13240e5b063746c8cd2e3e6e52553e7b8b4.tar.xz
org.eclipse.cdt-35d0e13240e5b063746c8cd2e3e6e52553e7b8b4.zip
Bug 514459 - StackOverflow in PDOMCPPVariable.getInitialValue
Change-Id: Iaee32f03a4fa821979fca1e1ca7b2b272bac1737 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexMultiFileTest.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexMultiFileTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexMultiFileTest.java
index 0e9481bebb0..10ce5ef99b2 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexMultiFileTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexMultiFileTest.java
@@ -10,6 +10,14 @@
*******************************************************************************/
package org.eclipse.cdt.internal.index.tests;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.IPDOMManager;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.testplugin.CProjectHelper;
+import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+
import junit.framework.TestSuite;
/**
@@ -301,4 +309,46 @@ public class IndexMultiFileTest extends IndexBindingResolutionTestBase {
public void testFriendFunctionDeclarationInNamespace_513681() throws Exception {
checkBindings();
}
+
+ // test.hpp
+ // #ifndef test_hpp
+ // #define test_hpp
+ //
+ // struct S {
+ // const S* x;
+ // };
+ //
+ // struct Base {
+ // static const S field;
+ // };
+ // struct Conjugate {
+ // static const S field;
+ // };
+ //
+ // #endif
+
+ //test1.cpp
+ //# include "test.hpp"
+ //
+ // const S Base::field = {
+ // &Conjugate::field
+ // };
+ //
+ // const S Conjugate::field = {
+ // &Base::field
+ // };
+
+ //test2.cpp
+ // #include "test.hpp"
+ //
+ // struct Waldo {
+ // static const S s;
+ // };
+ //
+ // const S Waldo::s = {
+ // &Base::field
+ // };
+ public void testStackOverflow_514459() throws Exception {
+ checkBindings();
+ }
}

Back to the top