[PATCH] D113472: [clang-tidy] Fix lint warning in ClangTidyDiagnosticConsumer.cpp (NFC)
Adrian Kuegel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 9 10:41:15 PST 2021
akuegel added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:381
+ (IsNolintBegin ? "END" : "BEGIN") + "' comment";
+ Error.Message = tooling::DiagnosticMessage(Message.str(), SM, Loc);
return Error;
----------------
tooling::DiagnosticMessage expects a StringRef. If you pass it a str() from a local string, this can lead to bad pointers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113472/new/
https://reviews.llvm.org/D113472
More information about the cfe-commits
mailing list