1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

Bug 402085 - UnsupportedOperationException in

ASTAmbiguousNode.getEvaluation()

Change-Id: I0ccad524d9ca717fd7a68fc571baf704159760ab
Reviewed-on: https://git.eclipse.org/r/10767
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
Nathan Ridge 2013-03-01 04:43:21 -05:00 committed by Sergey Prigogin
parent ec7a25ee6d
commit 5eb0fb0451
2 changed files with 14 additions and 0 deletions

View file

@ -7311,6 +7311,17 @@ public class AST2TemplateTests extends AST2TestBase {
helper.assertProblem("bind(s, 0, foo)", "bind"); helper.assertProblem("bind(s, 0, foo)", "bind");
} }
// template<typename T>
// T forward(T);
// template <typename, typename S1, typename S2>
// int combine(S1&& r1, S2&& r2);
// template <typename S1, typename S2>
// auto combine(S1 r1, S2 r2) -> decltype(combine<int>(forward<S1>(r1), forward<S2>(r2)));
public void testUnsupportedOperationExceptionInASTAmbiguousNode_402085() throws Exception {
parseAndCheckBindings();
}
// template <bool... Args> // template <bool... Args>
// struct ice_or; // struct ice_or;
// template <bool First> // template <bool First>

View file

@ -699,6 +699,9 @@ public class CPPSemantics {
private static void getAssociatedScopes(IType t, Set<ICPPNamespaceScope> namespaces, private static void getAssociatedScopes(IType t, Set<ICPPNamespaceScope> namespaces,
Set<ICPPFunction> friendFns, ObjectSet<IType> handled, CPPASTTranslationUnit tu) throws DOMException { Set<ICPPFunction> friendFns, ObjectSet<IType> handled, CPPASTTranslationUnit tu) throws DOMException {
t = getNestedType(t, TDEF | CVTYPE | PTR | ARRAY | REF); t = getNestedType(t, TDEF | CVTYPE | PTR | ARRAY | REF);
// No point getting namespaces associated with a dependent type - we don't know what they are yet.
if (CPPTemplates.isDependentType(t))
return;
if (t instanceof IBinding) { if (t instanceof IBinding) {
if (handled.containsKey(t)) if (handled.containsKey(t))
return; return;