[PATCH] D30748: [Lexer] Finding beginning of token with escaped new line

Paweł Żukowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 11 03:36:21 PST 2017


idlecode marked 3 inline comments as done.
idlecode added inline comments.


================
Comment at: lib/Lex/Lexer.cpp:457
+static bool isNewLineEscaped(const char *BufferStart, const char *Str) {
+  while (Str > BufferStart && isWhitespace(*Str))
+    --Str;
----------------
alexfh wrote:
> We only care about two specific sequences here: `\\\r\n` or `\\\n`, not a backslash followed by arbitrary whitespace.
I just saw that some functions (e.g. line 1285 in this file) accept whitespaces between escape character and new line. How about now?


https://reviews.llvm.org/D30748





More information about the cfe-commits mailing list