mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixes an exception in name resolution (second try), bug 211457.
This commit is contained in:
parent
f1ca140b10
commit
45b020487a
1 changed files with 4 additions and 3 deletions
|
@ -705,9 +705,10 @@ public class CPPVisitor {
|
|||
|
||||
}
|
||||
|
||||
public static IScope getContainingScope( IASTNode node ){
|
||||
if( node == null )
|
||||
public static IScope getContainingScope( final IASTNode inputNode ){
|
||||
if( inputNode == null || inputNode instanceof IASTTranslationUnit)
|
||||
return null;
|
||||
IASTNode node= inputNode;
|
||||
while( node != null ){
|
||||
if( node instanceof IASTName && !( node instanceof ICPPASTQualifiedName ) ){
|
||||
return getContainingScope( (IASTName) node );
|
||||
|
@ -814,7 +815,7 @@ public class CPPVisitor {
|
|||
}
|
||||
node = node.getParent();
|
||||
}
|
||||
return null;
|
||||
return new CPPScope.CPPScopeProblem( inputNode, IProblemBinding.SEMANTIC_BAD_SCOPE, inputNode.getRawSignature().toCharArray() );
|
||||
}
|
||||
|
||||
public static IScope getContainingScope( IASTName name ){
|
||||
|
|
Loading…
Add table
Reference in a new issue