diff options
-rw-r--r-- | clang-tools-extra/include-fixer/tool/ClangIncludeFixer.cpp | 8 |
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; } |