summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-10-28 13:00:49 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-10-28 13:00:49 +0000
commit2df9a3f2c4e40d6eba50237fff1aab946da516ce (patch)
tree79416e4b7bd8bb41b5e6689042136c0e42ae4b06 /clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
parent7c3053336233772ff33d4f908fc954566a7e6422 (diff)
downloadbcm5719-llvm-2df9a3f2c4e40d6eba50237fff1aab946da516ce.tar.gz
bcm5719-llvm-2df9a3f2c4e40d6eba50237fff1aab946da516ce.zip
[include-fixer] Make error message sound less like clang crashed.
We suppress all Clang diagnostics (because they would be wrong, include-fixer does custom recovery) but still want to give some feedback in case there was a compiler error we couldn't recover from. The most common case for this is a #include in the file that couldn't be found. llvm-svn: 285396
Diffstat (limited to 'clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp')
-rw-r--r--clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp b/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
index 969ac37794e..32443ce44d6 100644
--- a/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
+++ b/clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp
@@ -351,8 +351,12 @@ int includeFixerMain(int argc, const char **argv) {
Style, MinimizeIncludePaths);
if (tool.run(&Factory) != 0) {
- llvm::errs()
- << "Clang died with a fatal error! (incorrect include paths?)\n";
+ // We suppress all Clang diagnostics (because they would be wrong,
+ // include-fixer does custom recovery) but still want to give some feedback
+ // in case there was a compiler error we couldn't recover from. The most
+ // common case for this is a #include in the file that couldn't be found.
+ llvm::errs() << "Fatal compiler error occurred while parsing file!"
+ " (incorrect include paths?)\n";
return 1;
}
OpenPOWER on IntegriCloud