[PATCH] D136554: Implement CWG2631

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 12:13:25 PDT 2022


aaron.ballman added a comment.

I'm still thinking about the implementation, but I think this is heading in the correct direction.



================
Comment at: clang/lib/AST/ExprCXX.cpp:970-973
+const Expr *CXXDefaultArgExpr::getExpr() const {
+  return CXXDefaultArgExprBits.HasRewrittenInit ? getAdjustedRewrittenExpr()
+                                                : getParam()->getDefaultArg();
+}
----------------
Should also be a const_cast in the header file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136554/new/

https://reviews.llvm.org/D136554



More information about the cfe-commits mailing list