[all-commits] [llvm/llvm-project] 293573: [clang][tooling] Create SourceManager for Diagnost...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Tue Apr 6 01:41:07 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2935737da32dd21bf02e1a3c912a340de660d557
https://github.com/llvm/llvm-project/commit/2935737da32dd21bf02e1a3c912a340de660d557
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2021-04-06 (Tue, 06 Apr 2021)
Changed paths:
M clang/lib/Tooling/Tooling.cpp
M clang/unittests/Tooling/ToolingTest.cpp
Log Message:
-----------
[clang][tooling] Create SourceManager for DiagnosticsEngine before command-line parsing
In D84673, we started using `DiagnosticsEngine` during command-line parsing in more contexts.
When using `ToolInvocation`, a custom `DiagnosticsConsumer` can be specified and it might expect `SourceManager` to be present on the emitted diagnostics.
This patch ensures the `SourceManager` is set up in such scenarios.
Test authored by Jordan Rupprecht.
Reviewed By: rupprecht
Differential Revision: https://reviews.llvm.org/D99414
More information about the All-commits
mailing list