[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb5d9f00b2096: Forbid implicit conversion of constraint expression to bool (authored by erichkeane). Herald added a project: clang. Repository: rG

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-19 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann accepted this revision as: tahonermann. tahonermann added a comment. This revision is now accepted and ready to land. Looks good to me. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( +

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 490490. erichkeane added a comment. Fix clang-format, hopefully this saves me from the bots ;) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141954/new/ https://reviews.llvm.org/D141954 Files: clang/docs/ReleaseNotes.rst

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( + S.Context, SubstitutedExpression.get()->getType(), + CK_LValueToRValue, SubstitutedExpression.get(), +

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( + S.Context, SubstitutedExpression.get()->getType(), + CK_LValueToRValue, SubstitutedExpression.get(), +

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 490278. erichkeane added a comment. Added tests suggested by Tom, also moved the cast creation after checking of the return type, so that we end up not hitting hte assert that Tom came up with. Added 2 tests that show the two conditions (that DID repro

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( + S.Context, SubstitutedExpression.get()->getType(), + CK_LValueToRValue, SubstitutedExpression.get(), +

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:377-380 + SubstitutedExpression = ImplicitCastExpr::Create( + S.Context, SubstitutedExpression.get()->getType(), + CK_LValueToRValue, SubstitutedExpression.get(), +

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D141954#4062669 , @Mordante wrote: > I just tested locally with the latest nightly build > > Debian clang version 16.0.0 > (++20230116071901+2563ad8ef1a8-1~exp1~20230116072002.532) > Target: x86_64-pc-linux-gnu >

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I just tested locally with the latest nightly build Debian clang version 16.0.0 (++20230116071901+2563ad8ef1a8-1~exp1~20230116072002.532) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin and that passes the test that fails in the CI. Can

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I see the current main pass for the module build in libc++. The error message seems different, from the message for missing parts of the module map. I'll dig a bit further to see whether I can find what's wrong. CHANGES SINCE LAST ACTION

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 490187. erichkeane added a comment. The changes to the module map file seemed to make things worse! I reverted it for now, hoping this just goes green. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141954/new/ https://reviews.llvm.org/D141954

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D141954#4062029 , @philnik wrote: > In D141954#4061962 , @erichkeane > wrote: > >> Speaking of: I guess the libcxx failure is NOT caused by me? >>

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D141954#4061962 , @erichkeane wrote: > Speaking of: I guess the libcxx failure is NOT caused by me? > https://reviews.llvm.org/D141992 > > I see this on a different review, despite this not being committed. That's not

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Speaking of: I guess the libcxx failure is NOT caused by me? https://reviews.llvm.org/D141992 I see this on a different review, despite this not being committed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141954/new/ https://reviews.llvm.org/D141954

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Also, I forgot I added the release notes in that last patch :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141954/new/ https://reviews.llvm.org/D141954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 490120. erichkeane added a reviewer: libc++. erichkeane added a comment. Add module map fix, add nit from Shafik. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141954/new/ https://reviews.llvm.org/D141954 Files: clang/docs/ReleaseNotes.rst

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added a comment. In D141954#4060647 , @philnik wrote: > In D141954#4060246 , @erichkeane > wrote: > >> In D141954#4060244

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D141954#4060246 , @erichkeane wrote: > In D141954#4060244 , @philnik wrote: > >> In D141954#4060212 , @erichkeane >> wrote: >> >>> @ldionne

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:379 + S.Context, SubstitutedExpression.get()->getType(), + CK_LValueToRValue, SubstitutedExpression.get(), nullptr, + VK_PRValue, FPOptionsOverride());

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D141954#4060244 , @philnik wrote: > In D141954#4060212 , @erichkeane > wrote: > >> @ldionne @Mordante The libcxx failure isn't clear what it is complaining >> about, but I

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D141954#4060212 , @erichkeane wrote: > @ldionne @Mordante The libcxx failure isn't clear what it is complaining > about, but I thought this fix might end up breaking a libcxx test, since it > would be easy to fall into the

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added subscribers: Mordante, ldionne. erichkeane added a comment. @ldionne @Mordante The libcxx failure isn't clear what it is complaining about, but I thought this fix might end up breaking a libcxx test, since it would be easy to fall into the trap of having an implicit conversion

[PATCH] D141954: Forbid implicit conversion of constraint expression to bool

2023-01-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added a reviewer: clang-language-wg. Herald added a project: All. erichkeane requested review of this revision. As reported in https://github.com/llvm/llvm-project/issues/54524, and later in https://github.com/llvm/llvm-project/issues/60038, we were