diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-05 23:20:05 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-03-05 23:20:05 +0000 |
commit | 0cc323c6bed7206f9743a9775ec8d9cb90655f9c (patch) | |
tree | 5d4fea5c36daf0a866976076a48a17674fbb32f2 /lib/Parse/ParseDeclCXX.cpp | |
parent | a99f874bf2ade1e32f0feda7d5b8211171440f02 (diff) |
static_assert: Allow any string-literal as the message, not just a character
string literal, and adjust the diagnostic code to match. This also causes us
to escape any control characters in the message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 983bd7ee15..978b2b362d 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -610,7 +610,7 @@ Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd){ if (ExpectAndConsume(tok::comma, diag::err_expected_comma, "", tok::semi)) return 0; - if (Tok.isNot(tok::string_literal)) { + if (!isTokenStringLiteral()) { Diag(Tok, diag::err_expected_string_literal); SkipUntil(tok::semi); return 0; |