mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Bug 531475 - Push a lookup point when precomputing variable types and initial values in PDOMWriter.resolveNames()
Change-Id: Ia9d0c51a963f70d9a8b0ffcd3fa6b6c508f1d1dc
This commit is contained in:
parent
3ff810915a
commit
af73a4ed1a
1 changed files with 13 additions and 3 deletions
|
@ -428,9 +428,19 @@ public abstract class PDOMWriter implements IPDOMASTProcessor {
|
|||
// to the index.
|
||||
for (ICPPInternalDeclaredVariable variable : variables) {
|
||||
if (isVariableIndexed(variable)) {
|
||||
// Type and initial value will be cached by the variable.
|
||||
variable.getType();
|
||||
variable.getInitialValue();
|
||||
IASTNode lookupPoint = variable.getDefinition() != null
|
||||
? variable.getDefinition()
|
||||
: (variable.getDeclarations() != null && variable.getDeclarations().length > 0)
|
||||
? variable.getDeclarations()[0]
|
||||
: data.fAST;
|
||||
CPPSemantics.pushLookupPoint(lookupPoint);
|
||||
try {
|
||||
// Type and initial value will be cached by the variable.
|
||||
variable.getType();
|
||||
variable.getInitialValue();
|
||||
} finally {
|
||||
CPPSemantics.popLookupPoint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue