[PATCH] D36642: [Lexer] Report more precise skipped regions (PR34166)

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 12:20:47 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Lex/PPDirectives.cpp:570
+      // We'll warn about reaching the end of file later.
+      if (C == '\0' || C == '\r' || C == '\n')
+        break;
----------------
This doesn't really handle backslash-escaped newlines correctly.  (Not likely to matter, I guess, but better to get it right while we're messing with it.)

Could we use CurPPLexer->getSourceLocation() or something like that, instead of trying to scan the line ourselves?


https://reviews.llvm.org/D36642





More information about the cfe-commits mailing list