On Saturday, November 17, 2012 9:54 PM, Dmitri Gribenko wrote:
On Sat, Nov 17, 2012 at 9:16 PM, Andy Gibbs <[email protected]> wrote:
--- cfe/trunk/lib/Lex/Pragma.cpp (original)
+++ cfe/trunk/lib/Lex/Pragma.cpp Sat Nov 17 13:16:52 2012
@@ -503,6 +503,7 @@
   Lex(Tok);
   std::string ArgumentString;
   if (Tok.is(tok::comma) && !LexStringLiteral(Tok, ArgumentString,
+                                              "pragma comment",
                                               /*MacroExpansion=*/true))

Hi Andy,

Does it make sense to sink the word 'pragma' into the message itself?
The text "in %1" in the diagnostic is not an optimal solution IMHO.

I'm afraid I don't believe this can be easily done since the LexStringLiteral function is intended to be generic, i.e. not just for handling the parsing of pragmas -- for example, it is also utilised for the __has_warning builtin macro, where it produces the diagnostic "expected string literal in '__has_warning'".

Cheers
Andy



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to