mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix bug 102732 : NPE in CPPSemantics.getLookupScope modified from Devin's patch
This commit is contained in:
parent
a638aed7e5
commit
e91a9f5de5
1 changed files with 6 additions and 1 deletions
|
@ -958,8 +958,10 @@ public class CPPSemantics {
|
||||||
ICPPScope scope = null;
|
ICPPScope scope = null;
|
||||||
if( start instanceof ICPPScope )
|
if( start instanceof ICPPScope )
|
||||||
scope = (ICPPScope) start;
|
scope = (ICPPScope) start;
|
||||||
else
|
else if( start instanceof IASTName )
|
||||||
scope = getLookupScope( (IASTName) start );
|
scope = getLookupScope( (IASTName) start );
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
boolean friendInLocalClass = false;
|
boolean friendInLocalClass = false;
|
||||||
if( scope instanceof ICPPClassScope && data.forFriendship() ){
|
if( scope instanceof ICPPClassScope && data.forFriendship() ){
|
||||||
|
@ -3091,6 +3093,9 @@ public class CPPSemantics {
|
||||||
} catch (DOMException e1) {
|
} catch (DOMException e1) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if( scope == null )
|
||||||
|
return null;
|
||||||
|
|
||||||
CPPASTName astName = new CPPASTName();
|
CPPASTName astName = new CPPASTName();
|
||||||
astName.setParent( exp );
|
astName.setParent( exp );
|
||||||
astName.setPropertyInParent( STRING_LOOKUP_PROPERTY );
|
astName.setPropertyInParent( STRING_LOOKUP_PROPERTY );
|
||||||
|
|
Loading…
Add table
Reference in a new issue