diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index a07517a..cb4a9c9 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -1761,9 +1761,10 @@ void Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) {
   const char *AfterLessPos = CurPtr;
   char C = getAndAdvanceChar(CurPtr, Result);
   while (C != '>') {
-    // Skip escaped characters.
     if (C == '\\') {
-      // Skip the escaped character.
+      // C++11 [lex.header]p2 allows a backslash in header name to be handled
+      // in an implementation-defined manner. We treat \ as an escape
+      // character.
       getAndAdvanceChar(CurPtr, Result);
     } else if (C == '\n' || C == '\r' ||             // Newline.
                (C == 0 && (CurPtr-1 == BufferEnd ||  // End of file.
@@ -1934,13 +1935,23 @@ bool Lexer::SkipLineComment(Token &Result, const char *CurPtr) {
       while (isHorizontalWhitespace(*EscapePtr)) // Skip whitespace.
         --EscapePtr;
 
-      if (*EscapePtr == '\\') // Escaped newline.
+      if (*EscapePtr == '\\') {
+        // Escaped newline.
         CurPtr = EscapePtr;
-      else if (EscapePtr[0] == '/' && EscapePtr[-1] == '?' &&
-               EscapePtr[-2] == '?') // Trigraph-escaped newline.
-        CurPtr = EscapePtr-2;
-      else
-        break; // This is a newline, we're done.
+      } else if (EscapePtr[0] == '/' && EscapePtr[-1] == '?' &&
+                 EscapePtr[-2] == '?') {
+        // Trigraph-escaped newline. If trigraph are not enabled, warn that we
+        // ignored this trigraph.
+        if (LangOpts.Trigraphs) {
+          CurPtr = EscapePtr-2;
+        } else {
+          Diag(EscapePtr-2, diag::trigraph_ignored);
+          break;
+        }
+      } else {
+        // This is a newline, we're done.
+        break;
+      }
     }
 
     // Otherwise, this is a hard case.  Fall back on getAndAdvanceChar to
@@ -1992,7 +2003,6 @@ bool Lexer::SkipLineComment(Token &Result, const char *CurPtr) {
       cutOffLexing();
       return false;
     }
-
   } while (C != '\n' && C != '\r');
 
   // Found but did not consume the newline.  Notify comment handlers about the
diff --git a/test/Lexer/bcpl-escaped-newline.c b/test/Lexer/bcpl-escaped-newline.c
index d87ee9b..0449bbf 100644
--- a/test/Lexer/bcpl-escaped-newline.c
+++ b/test/Lexer/bcpl-escaped-newline.c
@@ -1,12 +1,10 @@
 // RUN: %clang_cc1 -Eonly -trigraphs %s
-// RUN: %clang_cc1 -Eonly -verify %s
 
 //\
 #error bar
 
 //??/
 #error qux
-// expected-error@-1 {{qux}}
 
 // Trailing whitespace!
 //\ 
diff --git a/test/Lexer/comment-escape.c b/test/Lexer/comment-escape.c
index 191e654..144df47 100644
--- a/test/Lexer/comment-escape.c
+++ b/test/Lexer/comment-escape.c
@@ -1,6 +1,11 @@
-// RUN: %clang -fsyntax-only %s 
+// RUN: %clang_cc1 -E %s
 // rdar://6757323
 // foo \
+#error "We are still in a line comment because this is a continuation line."
 
-#define blork 32
+// expected-warning {{trigraph ignored}} ??/
+#if 0 // This line is not commented out
+#error qux
+#endif
 
+#define blork 32
