Fix line number handling in line directive callback.
The line argument passed into the lineCallback function is the literal value of the first argument of the #line directive. lastLine in DoPreprocessing() should be updated taking into consideration the different definitions for #line between specs. Add a test to reveal the bug.
This commit is contained in:
parent
3a194f7ba4
commit
5cbc990a0a
9 changed files with 40 additions and 13 deletions
|
|
@ -212,6 +212,8 @@ public:
|
|||
void setCurrentString(int string) { currentScanner->setString(string); }
|
||||
void setScanner(TInputScanner* scanner) { currentScanner = scanner; }
|
||||
|
||||
bool lineDirectiveShouldSetNextLine() const;
|
||||
|
||||
void notifyVersion(int line, int version, const char* type_string);
|
||||
void notifyErrorDirective(int line, const char* error_message);
|
||||
void notifyLineDirective(int line, bool has_source, int source);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue