[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 03:11:46 PDT 2020


krasimir added a comment.

In D80144#2053543 <https://reviews.llvm.org/D80144#2053543>, @MyDeveloperDay wrote:

> maybe for now we just do
>
>   if (FormatTok->is(tok::l_square) && !Style.isObjC())
>       parseSquare();
>


I tried this, however FormatTest.cpp's verifyFormat is picky and explicitly checks both Cpp and ObjC styles return the same output (because ObjC++ is a thing):
https://github.com/llvm/llvm-project/blob/6f802ec4333cc1227bb37e258a81e9a588f964dc/clang/unittests/Format/FormatTest.cpp#L74
We can of course not use verifyFormat for these test cases, but this is a symptom that this may be the wrong approach.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80144/new/

https://reviews.llvm.org/D80144





More information about the cfe-commits mailing list