mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 19:35:36 +02:00
Patch for Devin Steffler.
Bug 97301 flattenLocationsToFile returns null causing NPE in indexer
This commit is contained in:
parent
7f446a4ff5
commit
1a9c0d8eb7
1 changed files with 3 additions and 2 deletions
|
@ -2585,15 +2585,16 @@ abstract class BaseScanner implements IScanner {
|
||||||
buffer, start, len));
|
buffer, start, len));
|
||||||
branchState(BRANCH_IF);
|
branchState(BRANCH_IF);
|
||||||
|
|
||||||
processIf(pos, pos + start + len, true); // fix 86870, process IF before skipping the condition and only process it once
|
|
||||||
|
|
||||||
if (expressionEvaluator.evaluate(buffer, start, len,
|
if (expressionEvaluator.evaluate(buffer, start, len,
|
||||||
definitions,
|
definitions,
|
||||||
getLineNumber(bufferPos[bufferStackPos]),
|
getLineNumber(bufferPos[bufferStackPos]),
|
||||||
getCurrentFilename()) == 0) {
|
getCurrentFilename()) == 0) {
|
||||||
|
processIf(pos, bufferPos[bufferStackPos], true);
|
||||||
skipOverConditionalCode(true);
|
skipOverConditionalCode(true);
|
||||||
if (isLimitReached())
|
if (isLimitReached())
|
||||||
handleInvalidCompletion();
|
handleInvalidCompletion();
|
||||||
|
} else {
|
||||||
|
processIf(pos, bufferPos[bufferStackPos], false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case ppElse:
|
case ppElse:
|
||||||
|
|
Loading…
Add table
Reference in a new issue