Fix empty line handling in line directive callback.

The current line number for the #line directive should be passed
in as parameter to the line directive callback. Without it, we
don't know how many empty lines we should output.
This commit is contained in:
Lei Zhang 2015-07-04 22:30:59 -04:00
parent 5cbc990a0a
commit 46ea5396ef
6 changed files with 49 additions and 35 deletions

View file

@ -5254,10 +5254,10 @@ void TParseContext::notifyErrorDirective(int line, const char* error_message)
}
}
void TParseContext::notifyLineDirective(int line, bool has_source, int source)
void TParseContext::notifyLineDirective(int curLineNo, int newLineNo, bool hasSource, int sourceNum)
{
if (lineCallback) {
lineCallback(line, has_source, source);
lineCallback(curLineNo, newLineNo, hasSource, sourceNum);
}
}