mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed a couple of NPEs in resolvePrefix.
This commit is contained in:
parent
97c3f29d23
commit
a73e7e9970
2 changed files with 14 additions and 8 deletions
|
@ -1906,10 +1906,13 @@ public class CVisitor {
|
|||
}
|
||||
}
|
||||
|
||||
IPDOM pdom = name.getTranslationUnit().getPDOM();
|
||||
if (pdom != null)
|
||||
result = (IBinding[])ArrayUtil.addAll(IBinding.class, result, pdom.resolvePrefix(name));
|
||||
|
||||
IASTTranslationUnit tu = name.getTranslationUnit();
|
||||
if (tu != null) {
|
||||
IPDOM pdom = tu.getPDOM();
|
||||
if (pdom != null)
|
||||
result = (IBinding[])ArrayUtil.addAll(IBinding.class, result, pdom.resolvePrefix(name));
|
||||
}
|
||||
|
||||
return (IBinding[]) ArrayUtil.trim( IBinding.class, result );
|
||||
}
|
||||
|
||||
|
|
|
@ -1878,7 +1878,7 @@ public class CPPSemantics {
|
|||
return ( pointOfDecl < ((ASTNode)node).getOffset() );
|
||||
|
||||
}
|
||||
return false;
|
||||
return true; // TODO - I changed this to true
|
||||
}
|
||||
|
||||
static private IBinding resolveAmbiguities( CPPSemantics.LookupData data, IASTName name ) throws DOMException {
|
||||
|
@ -3272,9 +3272,12 @@ public class CPPSemantics {
|
|||
}
|
||||
}
|
||||
|
||||
IPDOM pdom = name.getTranslationUnit().getPDOM();
|
||||
if (pdom != null)
|
||||
result = (IBinding[])ArrayUtil.addAll(IBinding.class, result, pdom.resolvePrefix(name));
|
||||
IASTTranslationUnit tu = name.getTranslationUnit();
|
||||
if (tu != null) {
|
||||
IPDOM pdom = tu.getPDOM();
|
||||
if (pdom != null)
|
||||
result = (IBinding[])ArrayUtil.addAll(IBinding.class, result, pdom.resolvePrefix(name));
|
||||
}
|
||||
|
||||
return (IBinding[]) ArrayUtil.trim( IBinding.class, result );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue