[PATCH] D65227: clang-format: Support `if CONSTEXPR` if CONSTEXPR is a macro.
Manuel Klimek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 25 17:18:54 PDT 2019
klimek accepted this revision.
klimek added a comment.
This revision is now accepted and ready to land.
I am surprised this works as well as it does, but tests seem to indicate it does, so... LG (minus potentially reducing some duplication :)
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2415
if (Left.is(tok::l_paren) && Left.Previous &&
(Left.Previous->isOneOf(tok::kw_if, tok::kw_for) ||
+ Left.Previous->endsSequence(tok::kw_constexpr, tok::kw_if) ||
----------------
Do we want to pull out a function for the repeated condition?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65227/new/
https://reviews.llvm.org/D65227
More information about the cfe-commits
mailing list