diff options
Diffstat (limited to 'lib/Lex/Pragma.cpp')
-rw-r--r-- | lib/Lex/Pragma.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp index 6bef2c8f77..6cea5fbe73 100644 --- a/lib/Lex/Pragma.cpp +++ b/lib/Lex/Pragma.cpp @@ -70,7 +70,10 @@ void PragmaNamespace::HandlePragma(Preprocessor &PP, Token &Tok) { // Get the handler for this token. If there is no handler, ignore the pragma. PragmaHandler *Handler = FindHandler(Tok.getIdentifierInfo(), false); - if (Handler == 0) return; + if (Handler == 0) { + PP.Diag(Tok, diag::warn_pragma_ignored); + return; + } // Otherwise, pass it down. Handler->HandlePragma(PP, Tok); |