[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 28 21:18:29 PST 2025
================
@@ -12806,6 +12810,19 @@ namespace {
HandleValue(Arg->IgnoreParenImpCasts());
}
+ void VisitLambdaExpr(LambdaExpr *E) {
+ if (!isInCXXOperatorCall) {
+ Inherited::VisitLambdaExpr(E);
+ return;
+ }
+
+ for (const auto &init : E->capture_inits())
+ if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(init))
+ HandleDeclRefExpr(DRE);
+ else
----------------
zhaohuiw42 wrote:
Fixed, and changed to use `dyn_cast_or_null`
https://github.com/llvm/llvm-project/pull/129198
More information about the cfe-commits
mailing list