User-defined literals: reject string and character UDLs in all places where the
grammar requires a string-literal and not a user-defined-string-literal. The
two constructs are still represented by the same TokenKind, in order to prevent
a combinatorial explosion of different kinds of token. A flag on Token tracks
whether a ud-suffix is present, in order to prevent clients from needing to look
at the token's spelling.
llvm-svn: 152098
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 0ce73cb..cd80c4c 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -1797,10 +1797,8 @@
ExprResult AsmString(ParseAsmStringLiteral());
if (AsmString.isInvalid()) {
- // If the reason we are recovering is because of an improper string
- // literal, it makes the most sense just to consume to the ')'.
- if (isTokenStringLiteral())
- T.skipToEnd();
+ // Consume up to and including the closing paren.
+ T.skipToEnd();
return StmtError();
}