diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-07-04 13:58:54 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-07-04 13:58:54 +0000 |
commit | 5362a71c02e7d448a8ce98cf00c47e353fba5d04 (patch) | |
tree | 8ddfe382e1c6d590dc240e76f7cd45cea5c78e24 /lib/Lex/Lexer.cpp | |
parent | 4ebdf5c4f587daef4e0be499802eac3a7a49bf2f (diff) |
Notes
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 81ea606f0d9f..6f1043ae7353 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -903,7 +903,10 @@ bool Lexer::SkipBCPLComment(Token &Result, const char *CurPtr) { } while (C != '\n' && C != '\r'); // Found but did not consume the newline. - + if (PP) + PP->HandleComment(SourceRange(getSourceLocation(BufferPtr), + getSourceLocation(CurPtr))); + // If we are returning comments as tokens, return this comment as a token. if (inKeepCommentMode()) return SaveBCPLComment(Result, CurPtr); @@ -1146,6 +1149,10 @@ bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr) { C = *CurPtr++; } + if (PP) + PP->HandleComment(SourceRange(getSourceLocation(BufferPtr), + getSourceLocation(CurPtr))); + // If we are returning comments as tokens, return this comment as a token. if (inKeepCommentMode()) { FormTokenWithChars(Result, CurPtr, tok::comment); |