fix rdar://6757323, where an escaped newline in a // comment
was causing the char after the newline to get eaten.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68430 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 3a3e86a..059afe2 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -848,6 +848,14 @@
     LexingRawMode = true;
     C = getAndAdvanceChar(CurPtr, Result);
     LexingRawMode = OldRawMode;
+
+    // If the char that we finally got was a \n, then we must have had something
+    // like \<newline><newline>.  We don't want to have consumed the second
+    // newline, we want CurPtr, to end up pointing to it down below.
+    if (C == '\n' || C == '\r') {
+      --CurPtr;
+      C = 'x'; // doesn't matter what this is.
+    }
     
     // If we read multiple characters, and one of those characters was a \r or
     // \n, then we had an escaped newline within the comment.  Emit diagnostic