summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-11-10 11:17:42 -0800
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-11-11 15:34:52 -0800
commiteef69021607950487a9e4110851a05abb54d0fb6 (patch)
tree75b7d27d3458d23d4b29db740af7af0c82972149 /clang/lib/Basic
parent0cf86da1741fb1a4278dc31dfc8f1538c9186892 (diff)
downloadbcm5719-llvm-eef69021607950487a9e4110851a05abb54d0fb6.tar.gz
bcm5719-llvm-eef69021607950487a9e4110851a05abb54d0fb6.zip
clang/Modules: Delay err_module_file_conflict if a diagnostic is in flight
As part of an audit of whether all errors are being reported from the ASTReader, delay err_module_file_conflict if a diagnostic is already in flight when it is hit. This required plumbing an extra argument through the delayed diagnostic mechanics in DiagnosticsEngine.
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r--clang/lib/Basic/Diagnostic.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index c82f74413ec..f686b6953e3 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -145,19 +145,20 @@ void DiagnosticsEngine::Reset() {
}
void DiagnosticsEngine::SetDelayedDiagnostic(unsigned DiagID, StringRef Arg1,
- StringRef Arg2) {
+ StringRef Arg2, StringRef Arg3) {
if (DelayedDiagID)
return;
DelayedDiagID = DiagID;
DelayedDiagArg1 = Arg1.str();
DelayedDiagArg2 = Arg2.str();
+ DelayedDiagArg3 = Arg3.str();
}
void DiagnosticsEngine::ReportDelayed() {
unsigned ID = DelayedDiagID;
DelayedDiagID = 0;
- Report(ID) << DelayedDiagArg1 << DelayedDiagArg2;
+ Report(ID) << DelayedDiagArg1 << DelayedDiagArg2 << DelayedDiagArg3;
}
void DiagnosticsEngine::DiagStateMap::appendFirst(DiagState *State) {
OpenPOWER on IntegriCloud