[clang] Reapply "[clang] Suppress -Wuninitialized for unevaluated builtin args" (PR #245821)

Matt Turner via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 13:09:48 PST 2026


================
@@ -423,7 +424,25 @@ static bool hasTrivialBody(const CallExpr *CE) {
   return false;
 }
 
+void ClassifyRefs::ignoreRefs(const Stmt *S) {
+  if (const auto *DRE = dyn_cast_or_null<DeclRefExpr>(S))
----------------
mattst88 wrote:

The top-level argument can't be, but a child can: `children()` returns null for the missing parts of a statement, e.g. `__builtin_constant_p(({ for (;;) break; x; }))`. I added that as a test in uninit-variables.c.

https://github.com/llvm/llvm-project/pull/245821


More information about the cfe-commits mailing list