[PATCH] D132232: Update coding standards for constexpr if statements; NFC

2022-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D132232#3735911 , @dblaikie wrote: > Yeah, I'm OK with this, though yeah, having an example where the `else` is > necessary, but I don't mind too much. I went ahead and switched the example to Erich's because it wasn't

[PATCH] D132232: Update coding standards for constexpr if statements; NFC

2022-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcda093681bad: Update coding standards for constexpr if statements; NFC (authored by aaron.ballman). Changed prior to commit: https://reviews.llvm.org/D132232?vs=453993=454085#toc Repository: rG LLVM

[PATCH] D132232: Update coding standards for constexpr if statements; NFC

2022-08-19 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Yeah, I'm OK with this, though yeah, having an example where the `else` is necessary, but I don't mind too much. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D132232: Update coding standards for constexpr if statements; NFC

2022-08-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Agreed. For other reviewers, note that this is the compelling example: template static constexpr bool VarTempl = true; template int func() { if constexpr (VarTempl) return 1; static_assert(!VarTempl); } void use() { func();

[PATCH] D132232: Update coding standards for constexpr if statements; NFC

2022-08-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: dblaikie, rjmccall, echristo, erichkeane. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: LLVM. We currently suggest that users not use an `else` clause after a `return`