[clang] [clang] Improve the lifetime_capture_by diagnostic on the constructor. (PR #117792)
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 28 01:16:04 PST 2024
================
@@ -535,6 +535,9 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call,
bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored(
diag::warn_dangling_lifetime_pointer, SourceLocation());
+ bool EnableDanglingCapture =
+ !Callee->getASTContext().getDiagnostics().isIgnored(
+ diag::warn_dangling_reference_captured, SourceLocation());
----------------
hokein wrote:
Done. I added some comments to clarify the behavior.
https://github.com/llvm/llvm-project/pull/117792
More information about the cfe-commits
mailing list