[PATCH] D154290: [WIP][Clang] Implement P2741R3 - user-generated static_assert messages

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 2 00:09:33 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/AST/ExprConstant.cpp:16384
+                                       Expr *SizeExpression,
+                                       Expr *PtrExpression, ASTContext &Ctx,
+                                       EvalResult &Status) const {
----------------
tbaeder wrote:
> Any reason the `Expr*` pointers here can't be `const`?
Nope!. Note that I'm not entirely sold on this interface,  having a function in Expr taking a bunch of function pointers does not feel amazing,
but Sema can't access to evaluation functions, so one way or another this functions needs to end up in `ExprConstants.cpp` and making it an Expr member doesn't seem more terribler than the alternative 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154290



More information about the cfe-commits mailing list