Skip to content

Commit 8109daa

Browse files
qiongsiwuvinay-deshmukh
authored andcommitted
Fix UB introduced by be0aa7b.
1 parent 9c86a05 commit 8109daa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/Tooling/DependencyScanning/DependencyScannerImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,12 @@ bool CompilerInstanceWithContext::initialize(DiagnosticConsumer *DC) {
714714
DiagConsumer = &DiagPrinterWithOS->DiagPrinter;
715715
}
716716

717-
DiagEngineWithCmdAndOpts = std::make_unique<DignosticsEngineWithDiagOpts>(
718-
CommandLine, OverlayFS, *DiagConsumer);
719-
720717
std::tie(OverlayFS, CommandLine) = initVFSForByNameScanning(
721718
Worker.BaseFS, CommandLine, CWD, "ScanningByName");
722719

720+
DiagEngineWithCmdAndOpts = std::make_unique<DignosticsEngineWithDiagOpts>(
721+
CommandLine, OverlayFS, *DiagConsumer);
722+
723723
std::tie(Driver, Compilation) = buildCompilation(
724724
CommandLine, *DiagEngineWithCmdAndOpts->DiagEngine, OverlayFS, Alloc);
725725

0 commit comments

Comments
 (0)