diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-19 21:10:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-19 21:10:26 +0000 |
commit | af7cdf45da4925f788e87a4c318ee67404646088 (patch) | |
tree | 13f0428c3e9d7a6d462508663e16e64fefa46945 /lib/Lex/Pragma.cpp | |
parent | 49138fc59eeac2aacd3b7e04c2642180d5baefd7 (diff) |
basic support for -Wunknown-pragmas, more coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547 91177308-0d34-0410-b5e6-96231b3b80d8
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); |