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 | bce3e035079562c887a4e2e51e4d7e3a370290eb (patch) | |
tree | 43fe117f0907aab64fd999eb3d972cd4a0cf3875 /lib/Rewrite | |
parent | 40dd1a052066fdac52a4f3ee67b861b885424a73 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r-- | lib/Rewrite/Frontend/InclusionRewriter.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Rewrite/Frontend/InclusionRewriter.cpp b/lib/Rewrite/Frontend/InclusionRewriter.cpp index 70b299213f..f333191d66 100644 --- a/lib/Rewrite/Frontend/InclusionRewriter.cpp +++ b/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. |