mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for David Daoust -Optimize the scanner to not tokenize the macro parameters if the expansion is null.
This commit is contained in:
parent
157f44eef3
commit
effb8b9fdb
1 changed files with 6 additions and 2 deletions
|
@ -3292,11 +3292,15 @@ public final class Scanner implements IScanner, IScannerData {
|
||||||
c = getChar( true );
|
c = getChar( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Position of the closing ')'
|
|
||||||
int endMacroOffset = lastContext.getOffset() - 1;
|
|
||||||
|
|
||||||
String betweenTheBrackets = strbuff.toString().trim();
|
String betweenTheBrackets = strbuff.toString().trim();
|
||||||
|
|
||||||
|
if (expansion.getExpansionSignature() == EMPTY_STRING) {
|
||||||
|
return; //
|
||||||
|
}
|
||||||
|
// Position of the closing ')'
|
||||||
|
int endMacroOffset = lastContext.getOffset() - 1;
|
||||||
|
|
||||||
Vector parameterValues = getMacroParameters(betweenTheBrackets, false);
|
Vector parameterValues = getMacroParameters(betweenTheBrackets, false);
|
||||||
Vector parameterValuesForStringizing = null;
|
Vector parameterValuesForStringizing = null;
|
||||||
SimpleToken t = null;
|
SimpleToken t = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue