Skip to content

Commit 7dce959

Browse files
committed
[clang] Stop parsing warning suppression mappings in driver
This gets rid of some extra IO from driver startup, and possiblity of emitting warnings twice.
1 parent 2f2ac3d commit 7dce959

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/tools/driver/driver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ int clang_main(int Argc, char **Argv, const llvm::ToolContext &ToolContext) {
318318

319319
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts =
320320
CreateAndPopulateDiagOpts(Args);
321+
// Driver's diagnostics don't use suppression mappings, so don't bother
322+
// parsing them. CC1 still receives full args, so this doesn't impact other
323+
// actions.
324+
DiagOpts->DiagnosticSuppressionMappingsFile.clear();
321325

322326
TextDiagnosticPrinter *DiagClient
323327
= new TextDiagnosticPrinter(llvm::errs(), &*DiagOpts);

0 commit comments

Comments
 (0)