aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2024-09-14 11:11:00 +0200
committerNikolas Klauser <nikolasklauser@berlin.de>2024-09-14 22:25:08 +0200
commite39205654dc11c50bd117e8ccac243a641ebd71f (patch)
treeae39582c4275f668d3d436be0cc6dacb19fa41ba /clang/lib/Sema/Sema.cpp
parentf0c5caa8144307ec59fbafeed1ba37bb3603b00f (diff)
downloadllvm-e39205654dc11c50bd117e8ccac243a641ebd71f.zip
llvm-e39205654dc11c50bd117e8ccac243a641ebd71f.tar.gz
llvm-e39205654dc11c50bd117e8ccac243a641ebd71f.tar.bz2
Reapply "Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (#108453)"
This reverts commit e1bd9740faa62c11cc785a7b70ec1ad17e286bd1. Fixes incorrect use of the `DiagnosticsEngine` in the clangd tests.
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 46ddd36..d567de7 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1683,7 +1683,7 @@ void Sema::EmitCurrentDiagnostic(unsigned DiagID) {
// that is different from the last template instantiation where
// we emitted an error, print a template instantiation
// backtrace.
- if (!DiagnosticIDs::isBuiltinNote(DiagID))
+ if (!Diags.getDiagnosticIDs()->isNote(DiagID))
PrintContextStack();
}
@@ -1697,7 +1697,8 @@ bool Sema::hasUncompilableErrorOccurred() const {
if (Loc == DeviceDeferredDiags.end())
return false;
for (auto PDAt : Loc->second) {
- if (DiagnosticIDs::isDefaultMappingAsError(PDAt.second.getDiagID()))
+ if (Diags.getDiagnosticIDs()->isDefaultMappingAsError(
+ PDAt.second.getDiagID()))
return true;
}
return false;