1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-02 05:45:58 +02:00

Bug 433556 - Unqualified name of the containing template is not resolved

This commit is contained in:
Sergey Prigogin 2014-04-25 22:22:05 -07:00
parent 9ea599ef7b
commit 8e871b492f
2 changed files with 11 additions and 5 deletions

View file

@ -432,7 +432,7 @@ public class AST2CPPTests extends AST2TestBase {
// struct A<T>::B { // struct A<T>::B {
// typedef typename A::type type; // typedef typename A::type type;
// }; // };
public void _testBug433556() throws Exception { public void testBug433556() throws Exception {
parseAndCheckBindings(); parseAndCheckBindings();
} }

View file

@ -334,9 +334,15 @@ public class CPPTemplates {
} }
if (scope instanceof IASTInternalScope) { if (scope instanceof IASTInternalScope) {
IASTInternalScope internalScope= (IASTInternalScope) scope; IASTInternalScope internalScope= (IASTInternalScope) scope;
scope= CPPVisitor.getContainingScope(internalScope.getPhysicalNode()); IASTNode physicalNode = internalScope.getPhysicalNode();
if (physicalNode instanceof ICPPASTCompositeTypeSpecifier &&
((ICPPASTCompositeTypeSpecifier) physicalNode).getName() instanceof ICPPASTQualifiedName) {
scope= scope.getParent();
} else {
scope= CPPVisitor.getContainingScope(physicalNode);
if (scope == internalScope) if (scope == internalScope)
return null; return null;
}
} else { } else {
scope= scope.getParent(); scope= scope.getParent();
} }