[PATCH] D37079: [Preprocessor] Correct internal token parsing of newline characters in CRLF
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 24 10:34:16 PDT 2017
rnk added inline comments.
Comment at: lib/Lex/Lexer.cpp:3076-3077
+ if (CurPtr != Char && (CurPtr == '\n' || CurPtr == '\r'))
+ Char = getAndAdvanceChar(CurPtr, Result);
// If we are inside a preprocessor directive and we see the end of line,
Should we only do this in the `\r` case? If I understand correctly, we're basically saying, if this is a CR, and the next byte is an LF, advance one more and do the pre-processor stuff.
More information about the cfe-commits