diff options
author | Lubos Lunak <l.lunak@centrum.cz> | 2014-05-01 12:54:03 +0000 |
---|---|---|
committer | Lubos Lunak <l.lunak@centrum.cz> | 2014-05-01 12:54:03 +0000 |
commit | 576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20 (patch) | |
tree | 032789f8ef00241add4e5a3b7f2f93b7d3269f34 /clang/lib/Rewrite/Frontend | |
parent | 4a04294882bdd530bd0c3b388980e5326423e1b2 (diff) | |
download | bcm5719-llvm-576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20.tar.gz bcm5719-llvm-576a0415cb8b0615c2d6e8fd87e5427ddbc7fb20.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: 207758
Diffstat (limited to 'clang/lib/Rewrite/Frontend')
-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 70b299213f3..f333191d669 100644 --- a/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp +++ b/clang/lib/Rewrite/Frontend/InclusionRewriter.cpp @@ -515,13 +515,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. |