diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-08-30 23:07:51 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-08-30 23:07:51 +0000 |
commit | 3781a36238ef3825e3cf559f1ee4eaa1d719a683 (patch) | |
tree | 4233bfaa6a034da26ee12ec45c770fabcbdbc515 /clang/lib/Frontend/DependencyFile.cpp | |
parent | a45c20b0492633fa346720c15a0b62ea166fd84d (diff) | |
download | bcm5719-llvm-3781a36238ef3825e3cf559f1ee4eaa1d719a683.tar.gz bcm5719-llvm-3781a36238ef3825e3cf559f1ee4eaa1d719a683.zip |
Change err_pp_file_not_found back to an Error; when it's a Warning, we suppress it in system headers. And it is not a good idea to suppress it in system headers. (This was originally changed in r134996 to implement -MG.)
Fixes <rdar://10041960>. And also brings down the number of warnings without a flag by one :)
llvm-svn: 138842
Diffstat (limited to 'clang/lib/Frontend/DependencyFile.cpp')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 84358643782..db43ab9bbe1 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -86,14 +86,8 @@ void clang::AttachDependencyFileGen(Preprocessor &PP, } // Disable the "file not found" diagnostic if the -MG option was given. - // FIXME: Ideally this would live in the driver, but we don't have the ability - // to remap individual diagnostics there without creating a DiagGroup, in - // which case we would need to prevent the group name from showing up in - // diagnostics. - if (Opts.AddMissingHeaderDeps) { - PP.getDiagnostics().setDiagnosticMapping(diag::warn_pp_file_not_found, - diag::MAP_IGNORE, SourceLocation()); - } + if (Opts.AddMissingHeaderDeps) + PP.SetSuppressIncludeNotFoundError(true); PP.addPPCallbacks(new DependencyFileCallback(&PP, OS, Opts)); } |