|
@@ -720,6 +720,12 @@ static void PrintPreprocessedTokens(Preprocessor &PP, Token &Tok,
|
|
|
// -traditional-cpp the lexer keeps /all/ whitespace, including comments.
|
|
|
SourceLocation StartLoc = Tok.getLocation();
|
|
|
Callbacks->MoveToLine(StartLoc.getLocWithOffset(Tok.getLength()));
|
|
|
+ } else if (Tok.is(tok::eod)) {
|
|
|
+ // Don't print end of directive tokens, since they are typically newlines
|
|
|
+ // that mess up our line tracking. These come from unknown pre-processor
|
|
|
+ // directives or hash-prefixed comments in standalone assembly files.
|
|
|
+ PP.Lex(Tok);
|
|
|
+ continue;
|
|
|
} else if (Tok.is(tok::annot_module_include)) {
|
|
|
// PrintPPOutputPPCallbacks::InclusionDirective handles producing
|
|
|
// appropriate output here. Ignore this token entirely.
|