diff options
author | Nikolas Klauser <nikolasklauser@berlin.de> | 2024-09-13 11:34:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 11:34:20 +0200 |
commit | e7f782e7481cea23ef452a75607d3d61f5bd0d22 (patch) | |
tree | aa5db347b90552d84849992a01bf8cbe32e1bd20 /clang/lib/Sema/Sema.cpp | |
parent | fbf0a8015389bccab80bba00be49955079913152 (diff) | |
download | llvm-e7f782e7481cea23ef452a75607d3d61f5bd0d22.zip llvm-e7f782e7481cea23ef452a75607d3d61f5bd0d22.tar.gz llvm-e7f782e7481cea23ef452a75607d3d61f5bd0d22.tar.bz2 |
Reapply "[clang] Extend diagnose_if to accept more detailed warning information (#70976)" (#108453)
This reverts commit e0cd11eba526234ca14a0b91f5598ca3363b6aca.
Update the use of `getWarningOptionForDiag` in flang to use the
DiagnosticIDs.
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 5 |
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; |