idlecode added a comment.

I don't have commit rights yet so I would be grateful for help in this matter :)



================
Comment at: lib/Lex/Lexer.cpp:469-477
+    if (!isVerticalWhitespace(LexStart[0]))
+      continue;
 
-  const char *LexStart = StrData;
-  while (LexStart != BufStart) {
-    if (LexStart[0] == '\n' || LexStart[0] == '\r') {
-      ++LexStart;
-      break;
-    }
+    if (Lexer::isNewLineEscaped(BufStart, LexStart))
+      continue;
 
+    // LexStart should point at first character of logical line.
----------------
alexfh wrote:
> The logic is hard to get here. I'd use a single `if` and reverse the 
> condition to get rid of the `continue`s:
> 
>   if (isVerticalWhitespace(*LexStart) && !Lexer::isNewLineEscaped(BufStart, 
> LexStart)) {
>     ++LexStart;
>     break;
>   }
Yes, I know - I thought that more vertical code composition would help


https://reviews.llvm.org/D30748



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to