break; // Found the newline? Break out!
// Otherwise, this is a hard case. Fall back on getAndAdvanceChar to
- // properly decode the character.
+ // properly decode the character. Read it in raw mode to avoid emitting
+ // diagnostics about things like trigraphs. If we see an escaped newline,
+ // we'll handle it below.
const char *OldPtr = CurPtr;
+ bool OldRawMode = isLexingRawMode();
+ LexingRawMode = true;
C = getAndAdvanceChar(CurPtr, Result);
+ LexingRawMode = OldRawMode;
// 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
foo /* expected-error {{expected '=', ',', ';', 'asm', or '__attribute__' after declarator}} */
+
+// rdar://6060752 - We should not get warnings about trigraphs in comments:
+// '????'
+/* ???? */
+
+
+
+