aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2024-09-26 11:39:33 +0200
committerKadir Cetinkaya <kadircet@google.com>2024-09-26 12:16:07 +0200
commit2ad435f9f6fb792d9b010ddf56ca3ea26fbf5f15 (patch)
tree53215da0dd93f76bca6b7008fcae3fe809f41588 /clang/lib/Sema/Sema.cpp
parent056a3f4673a4f88d89e9bf00614355f671014ca5 (diff)
downloadllvm-2ad435f9f6fb792d9b010ddf56ca3ea26fbf5f15.zip
llvm-2ad435f9f6fb792d9b010ddf56ca3ea26fbf5f15.tar.gz
llvm-2ad435f9f6fb792d9b010ddf56ca3ea26fbf5f15.tar.bz2
Revert "[clang] Extend diagnose_if to accept more detailed warning information (#70976)"
This reverts commit e39205654dc11c50bd117e8ccac243a641ebd71f. There are further discussions in https://github.com/llvm/llvm-project/pull/70976, happening for past two weeks. Since there were no responses for couple weeks now, reverting until author is back.
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 6d7a57d..03dd39b 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1676,7 +1676,7 @@ void Sema::EmitDiagnostic(unsigned DiagID, const DiagnosticBuilder &DB) {
// that is different from the last template instantiation where
// we emitted an error, print a template instantiation
// backtrace.
- if (!Diags.getDiagnosticIDs()->isNote(DiagID))
+ if (!DiagnosticIDs::isBuiltinNote(DiagID))
PrintContextStack();
}
@@ -1690,8 +1690,7 @@ bool Sema::hasUncompilableErrorOccurred() const {
if (Loc == DeviceDeferredDiags.end())
return false;
for (auto PDAt : Loc->second) {
- if (Diags.getDiagnosticIDs()->isDefaultMappingAsError(
- PDAt.second.getDiagID()))
+ if (DiagnosticIDs::isDefaultMappingAsError(PDAt.second.getDiagID()))
return true;
}
return false;