diff options
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
| -rw-r--r-- | clang/lib/Lex/Lexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 79472961c01..976a0d2fbd8 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -3073,6 +3073,8 @@ LexNextToken: case '\n': case '\r': + if (CurPtr[0] != Char && (CurPtr[0] == '\n' || CurPtr[0] == '\r')) + Char = getAndAdvanceChar(CurPtr, Result); // If we are inside a preprocessor directive and we see the end of line, // we know we are done with the directive, so return an EOD token. if (ParsingPreprocessorDirective) { |

