[clang] f5030f1 - [AST] Suppress diagnostic output when generating code
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 18:31:05 PDT 2021
Author: Stephen Kelly
Date: 2021-03-17T01:30:22Z
New Revision: f5030f1a8e4affef2ab92b3268292f46d0052fd5
URL: https://github.com/llvm/llvm-project/commit/f5030f1a8e4affef2ab92b3268292f46d0052fd5
DIFF: https://github.com/llvm/llvm-project/commit/f5030f1a8e4affef2ab92b3268292f46d0052fd5.diff
LOG: [AST] Suppress diagnostic output when generating code
Added:
Modified:
clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
Removed:
################################################################################
diff --git a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
index 74ba70eefa04..06b58c6382ed 100644
--- a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
+++ b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
@@ -135,6 +135,8 @@ int main(int argc, const char **argv) {
if (!Compiler.hasDiagnostics())
return 1;
+ // Suppress "2 errors generated" or similar messages
+ Compiler.getDiagnosticOpts().ShowCarets = false;
Compiler.createSourceManager(Files);
ASTSrcLocGenerationAction ScopedToolAction;
More information about the cfe-commits
mailing list