diff options
| author | Lubos Lunak <l.lunak@centrum.cz> | 2013-12-04 10:21:41 +0000 |
|---|---|---|
| committer | Lubos Lunak <l.lunak@centrum.cz> | 2013-12-04 10:21:41 +0000 |
| commit | 5c4269c68810d4bdda5abdc39c0ee71854c82854 (patch) | |
| tree | 2aa82ea644844a0db00341e2f44615731c9cb194 /clang/lib/Rewrite/Frontend/InclusionRewriter.cpp | |
| parent | cdd86884a4fe5e879b6d1ac1034e5056a423f0ab (diff) | |
| download | bcm5719-llvm-5c4269c68810d4bdda5abdc39c0ee71854c82854.tar.gz bcm5719-llvm-5c4269c68810d4bdda5abdc39c0ee71854c82854.zip | |
do not warn about unknown pragmas in modes that do not handle them (pr9537)
And refactor to have just one place in code that sets up the empty
pragma handlers.
llvm-svn: 196372
Diffstat (limited to 'clang/lib/Rewrite/Frontend/InclusionRewriter.cpp')
| -rw-r--r-- | clang/lib/Rewrite/Frontend/InclusionRewriter.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp index 176ea3f79dc..a3b6c49ac11 100644 --- a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp +++ b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp @@ -518,13 +518,7 @@ void clang::RewriteIncludesInInput(Preprocessor &PP, raw_ostream *OS, InclusionRewriter *Rewrite = new InclusionRewriter(PP, *OS, Opts.ShowLineMarkers); PP.addPPCallbacks(Rewrite); - // Ignore all pragmas, otherwise there will be warnings about unknown pragmas - // (because there's nothing to handle them). - PP.AddPragmaHandler(new EmptyPragmaHandler()); - // Ignore also all pragma in all namespaces created - // in Preprocessor::RegisterBuiltinPragmas(). - PP.AddPragmaHandler("GCC", new EmptyPragmaHandler()); - PP.AddPragmaHandler("clang", new EmptyPragmaHandler()); + PP.IgnorePragmas(); // First let the preprocessor process the entire file and call callbacks. // Callbacks will record which #include's were actually performed. |

