[clang-tools-extra] [clang] [clang] Extend diagnose_if to accept more detailed warning information (PR #70976)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 28 13:37:02 PST 2023
================
@@ -177,17 +177,17 @@ DiagnosticBuilder ClangTidyContext::diag(
StringRef CheckName, SourceLocation Loc, StringRef Description,
DiagnosticIDs::Level Level /* = DiagnosticIDs::Warning*/) {
assert(Loc.isValid());
- unsigned ID = DiagEngine->getDiagnosticIDs()->getCustomDiagID(
- Level, (Description + " [" + CheckName + "]").str());
+ unsigned ID = DiagEngine->getDiagnosticIDs()->getCustomDiagID(Level,
+ (Description + " [" + CheckName + "]").str());
CheckNamesByDiagnosticID.try_emplace(ID, CheckName);
return DiagEngine->Report(Loc, ID);
}
DiagnosticBuilder ClangTidyContext::diag(
StringRef CheckName, StringRef Description,
DiagnosticIDs::Level Level /* = DiagnosticIDs::Warning*/) {
- unsigned ID = DiagEngine->getDiagnosticIDs()->getCustomDiagID(
- Level, (Description + " [" + CheckName + "]").str());
+ unsigned ID = DiagEngine->getDiagnosticIDs()->getCustomDiagID(Level,
----------------
erichkeane wrote:
Same here.
https://github.com/llvm/llvm-project/pull/70976
More information about the cfe-commits
mailing list