[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 01:03:29 PDT 2020
MyDeveloperDay added a comment.
In D80144#2042926 <https://reviews.llvm.org/D80144#2042926>, @JakeMerdichAMD wrote:
> This is a great improvement in readability. I think this will get in here before it does for clang proper :D
>
> Likely/unlikely also seem to be supported on while, do-while, and for loops (case statements too, but that's not relevant). Should we also apply identical logic there? Far less useful/common than plain if's so it's not a blocker, but it's best to be consistent and I can imagine some decent use cases.
I struggled to find decent examples, cppreference.org and the standard is very think on the ground. We should handle those cases but I feel maybe small increments are better as its not common code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80144/new/
https://reviews.llvm.org/D80144
More information about the cfe-commits
mailing list