diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 63044426531..2008a13a293 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -7561,31 +7561,6 @@ public class AST2TemplateTests extends AST2TestBase { parseAndCheckBindings(); } - // template - // struct is_convertible {}; - // - // class function { - // public: - // template::type::value> - // function(_Functor); - // }; - // - // class A {}; - // - // struct B { - // B(const char* s); - // }; - // - // template void waldo(const B& b); - // template void waldo(function f); - // - // void test() { - // waldo(""); // problem on waldo - // } - public void testSfinaeInIdExpression_459940() throws Exception { - parseAndCheckBindings(); - } - // template // struct M { // template diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java index ac72bf97e20..a364c4c22be 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java @@ -85,12 +85,7 @@ import org.eclipse.core.runtime.CoreException; */ public class Value implements IValue { public static final int MAX_RECURSION_DEPTH = 25; - // Value.UNKNOWN indicates general inability to determine a value. It doesn't have to be an error, - // it could be that evaluation ran into a performance limit, or that we can't model this kind of - // value (such as a pointer to a function). public static final Value UNKNOWN= new Value("".toCharArray(), null); //$NON-NLS-1$ - // Value.ERROR indicates that an error, such as a substitution failure, occurred during evaluation. - public static final Value ERROR= new Value("".toCharArray(), null); //$NON-NLS-1$ public static final Value NOT_INITIALIZED= new Value("<__>".toCharArray(), null); //$NON-NLS-1$ private static final IType INT_TYPE= new CPPBasicType(ICPPBasicType.Kind.eInt, 0); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java index 3d69847c864..877fa763b01 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalFixed.java @@ -34,7 +34,7 @@ import org.eclipse.core.runtime.CoreException; */ public class EvalFixed extends CPPEvaluation { public static final ICPPEvaluation INCOMPLETE = - new EvalFixed(ProblemType.UNKNOWN_FOR_EXPRESSION, PRVALUE, Value.ERROR); + new EvalFixed(ProblemType.UNKNOWN_FOR_EXPRESSION, PRVALUE, Value.UNKNOWN); private final IType fType; private final IValue fValue; @@ -170,10 +170,6 @@ public class EvalFixed extends CPPEvaluation { IValue value = CPPTemplates.instantiateValue(fValue, tpMap, packOffset, within, maxdepth, point); if (type == fType && value == fValue) return this; - // If an error occurred while instantiating the value (such as a substitution failure), - // propagate that error. - if (value == Value.ERROR) - return EvalFixed.INCOMPLETE; return new EvalFixed(type, fValueCategory, value); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java index e89cdf1da66..77c442ec60f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalID.java @@ -342,7 +342,7 @@ public class EvalID extends CPPDependentEvaluation { } if (fieldOwner instanceof IProblemBinding || nameOwner instanceof IProblemBinding) - return EvalFixed.INCOMPLETE; + return this; if (templateArgs == fTemplateArgs && fieldOwner == fFieldOwner && nameOwner == fNameOwner) return this;