diff options
author | Andy Gibbs <andyg1001@hotmail.co.uk> | 2012-11-17 19:16:52 +0000 |
---|---|---|
committer | Andy Gibbs <andyg1001@hotmail.co.uk> | 2012-11-17 19:16:52 +0000 |
commit | 97f8461a2c553f68a258612d2322e4281c3f0915 (patch) | |
tree | 6b5036827ca26138a9cd9dd548c56c3246f1b3b6 /lib/Lex/Pragma.cpp | |
parent | 02a176871d91bba3004e4f94b2d4d588ae4b2122 (diff) |
Made the "expected string literal" diagnostic more expressive
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 0c1c9dbee5..783588e1f7 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -503,6 +503,7 @@ void Preprocessor::HandlePragmaComment(Token &Tok) { Lex(Tok); std::string ArgumentString; if (Tok.is(tok::comma) && !LexStringLiteral(Tok, ArgumentString, + "pragma comment", /*MacroExpansion=*/true)) return; @@ -559,7 +560,8 @@ void Preprocessor::HandlePragmaMessage(Token &Tok) { } std::string MessageString; - if (!FinishLexStringLiteral(Tok, MessageString, /*MacroExpansion=*/true)) + if (!FinishLexStringLiteral(Tok, MessageString, "pragma message", + /*MacroExpansion=*/true)) return; if (ExpectClosingParen) { @@ -1039,7 +1041,8 @@ public: SourceLocation StringLoc = Tok.getLocation(); std::string WarningName; - if (!PP.FinishLexStringLiteral(Tok, WarningName, /*MacroExpansion=*/false)) + if (!PP.FinishLexStringLiteral(Tok, WarningName, "pragma diagnostic", + /*MacroExpansion=*/false)) return; if (Tok.isNot(tok::eod)) { |