[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-20 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Having looked at this some more, I wonder if this patch is covering for another problem. Running even the simplest example fails on an assertion in `Sema::BuildCXXTypeConstructExpr`: https://godbolt.org/z/fMPcsh4f3. It looks like that function is creating the majority of

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. I can also confirm that `main` and my branch (containing https://reviews.llvm.org/D119477 and https://reviews.llvm.org/D119476) both assert on the same line: $ cat bug-53244.cc struct A { consteval A() {} A(const A&) = delete; consteval void

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. First sanity check: applying this patch on my branch causes no test failures either in the `tools/clang/unittests/Tooling/ToolingTests` or `ninja check-clang-semacxx`. Hopefully I can think this through more deeply soon. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-15 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Thanks for the heads-up! I'm a little busy this week, but I need to think about potential interference between these two changes. Off the top of my head it looks like they should get along fine, but there may be subtleties. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I haven't had the chance to review this yet (in C standards meetings again this week), but I did notice that https://reviews.llvm.org/D119477 seems to be touching on a related (or possibly the same) issue. Can you coordinate with the other patch author to make

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think this makes sense to me, I'd like to see it captured in an AST test though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119095/new/ https://reviews.llvm.org/D119095

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. There are some godbolt links in the github issues. Expression `A{}.f();` generates the call of the move constructor from nowhere as well - https://godbolt.org/z/MceYedKzj With the patch this node (that lives inside an another `ConstantExpr` node): MemberExpr

[PATCH] D119095: [clang] Fix redundant functional cast in ConstantExpr

2022-02-06 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: aaron.ballman, cor3ntin. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When removing nested ConstantExprs, the tree transformer doesn't remove redundant CXXFunctionalCasts that