[PATCH] D151720: [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

Takuya Shimizu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 10:32:17 PDT 2023


hazohelet updated this revision to Diff 527104.
hazohelet added a comment.

I think the proper message here can be obtained by letting the stack frame keep the syntactical structure of the function call, although it introduces additional memory footprint.

- Add `const Expr *` new field to `CallStackFrame` in order to save the syntactical structure of the member function call
- Generate proper message using that new field
- Fallback to the conventional value-based printing when handling destructors because it is not explicitly written by the user


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

https://reviews.llvm.org/D151720

Files:
  clang/docs/ReleaseNotes.rst
  clang/lib/AST/ExprConstant.cpp
  clang/test/AST/Interp/constexpr-nqueens.cpp
  clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
  clang/test/CXX/temp/temp.param/p8-cxx20.cpp
  clang/test/SemaCXX/constant-expression-cxx11.cpp
  clang/test/SemaCXX/constexpr-frame-describe.cpp
  clang/test/SemaCXX/cxx2a-consteval.cpp
  clang/test/SemaCXX/deduced-return-type-cxx14.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151720.527104.patch
Type: text/x-patch
Size: 16722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230531/6ecc0e65/attachment-0001.bin>


More information about the cfe-commits mailing list