[PATCH] D133413: [clang-tidy] Fix crashes on `if consteval` in readability checks
Emilia Dreamer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 7 04:46:41 PDT 2022
rymiel added a comment.
Note for reviewing:
- The C++ standard, from what I could tell, seems to imply the the else clause of a consteval if clause could be written without braces, however it seems that both GCC and Clang don't allow for this, so both clauses of constexpr if statements should be skipped in readability-braces-around-statement
- I was really unsure what to do with the tests. Since consteval if is a C++23 feature, I felt like they needed to be in their own files, but these files are also super minimal, as they really only make sure that using them doesn't crash.
- The tests use the flag `-std=c++2b`. Seeing as that flag will probably be renamed once 2023 actually rolls around, is that okay?
- I cannot commit this patch myself, please commit as `Emilia Dreamer <emilia at rymiel.space>`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133413/new/
https://reviews.llvm.org/D133413
More information about the cfe-commits
mailing list