[clang] Reapply "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression" (PR #127338)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 15 09:29:02 PST 2025


================
@@ -2464,6 +2464,10 @@ CFGBlock *CFGBuilder::VisitCXXDefaultInitExpr(CXXDefaultInitExpr *Init,
       autoCreateBlock();
       appendStmt(Block, Init);
     }
+
+    // Unlike CXXDefaultArgExpr::getExpr stripped off the top level FullExpr and
+    // ConstantExpr, CXXDefaultInitExpr::getExpr does not do this, so we don't
+    // need to ignore ParenExprs, because the top level will not be a ParenExpr.
----------------
steakhal wrote:

>From the PR summary, I was expecting a semantic fix to the reapplied commit.
This commit only adds some comments. Did I miss something?

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


More information about the cfe-commits mailing list