[PATCH] D68436: [clang-scan-deps] Improve string/character literal skipping

Kousik Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 06:06:48 PDT 2019


kousikk accepted this revision.
kousikk marked an inline comment as done.
kousikk added inline comments.


================
Comment at: clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp:206
+    if (*First == '\\') {
+      if (++First == End)
+        return;
----------------
dexonsmith wrote:
> > Should you also check if the character right after a backslash is equal to Terminator and if it is, continue on without terminating?
> > 
> 
> @kousikk, that was handled before this patch.  This `++First` combined with the one in the loop increment handles skipping over an escaped terminator.
Ah makes sense, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68436/new/

https://reviews.llvm.org/D68436





More information about the cfe-commits mailing list