[clang][ExprConstant] Fix display of syntactically-invalid note for member function...
authorTakuya Shimizu <shimizu2486@gmail.com>
Tue, 27 Jun 2023 15:19:46 +0000 (00:19 +0900)
committerTakuya Shimizu <shimizu2486@gmail.com>
Tue, 27 Jun 2023 15:19:46 +0000 (00:19 +0900)
commitf6be96aa4e5e282ea52041ad6fe5fff13a3df103
tree8c400f843b2c20506723c5330d73646dd0539812
parent1fce8df53a30182f2125c5e0986f9506481778f7
[clang][ExprConstant] Fix display of syntactically-invalid note for member function calls

This patch makes the display of member function calls more true to the user-written code by making use of the syntactical structure of the function calls.
This patch also changes the display of conventional value-based printing from arrow operator to dot operator.
This avoids the syntactical invalidness in notes previously caused by the display of & operator
(lack of parentheses and reference of rvalue)

Fixes https://github.com/llvm/llvm-project/issues/57081

Reviewed By: cjdb
Differential Revision: https://reviews.llvm.org/D151720
clang/docs/ReleaseNotes.rst
clang/lib/AST/ExprConstant.cpp
clang/test/AST/Interp/constexpr-nqueens.cpp
clang/test/AST/Interp/lambda.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 [new file with mode: 0644]
clang/test/SemaCXX/cxx2a-consteval.cpp
clang/test/SemaCXX/deduced-return-type-cxx14.cpp