Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2011-01-27 04:29:03 -0500
committerMarkus Schorn2011-01-27 04:29:03 -0500
commitb17869ff74a099b4ed57284047a56b12fc415de5 (patch)
treeaa697e93a57d266beeb65f71deffd6b2183820e2
parentf11d5a23d7520fdc7a6c74b5c97712099d1defc9 (diff)
downloadorg.eclipse.cdt-b17869ff74a099b4ed57284047a56b12fc415de5.tar.gz
org.eclipse.cdt-b17869ff74a099b4ed57284047a56b12fc415de5.tar.xz
org.eclipse.cdt-b17869ff74a099b4ed57284047a56b12fc415de5.zip
Fix some LR-parser test-failures.
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java
index b5d6c34510..c3e4caf2b1 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java
@@ -31,6 +31,7 @@ import org.eclipse.cdt.core.parser.ParserUtil;
import org.eclipse.cdt.core.parser.ScannerInfo;
import org.eclipse.cdt.core.parser.tests.ast2.AST2BaseTest;
import org.eclipse.cdt.internal.core.dom.parser.c.CVisitor;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase;
import org.eclipse.core.runtime.CoreException;
/**
@@ -59,8 +60,12 @@ public class ParseHelper {
public int visit(IASTName name) {
nameList.add(name);
IBinding binding = name.resolveBinding();
- if (binding instanceof IProblemBinding)
+ if (binding instanceof IProblemBinding) {
+ // Suppress assertion that would be thrown for computing string representation
+ // of template-ids. The flag will be reset by BaseTestCase.setUp().
+ CPPASTNameBase.sAllowNameComputation= true;
problemBindings.add(name.toString());
+ }
if (binding == null)
numNullBindings++;
return PROCESS_CONTINUE;

Back to the top