[PATCH] D137327: [clang-format] Handle object instansiation in if-statements

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 12:43:18 PDT 2023


owenpan added a comment.

In D137327#4233551 <https://reviews.llvm.org/D137327#4233551>, @thieta wrote:

> In D137327#4233290 <https://reviews.llvm.org/D137327#4233290>, @MyDeveloperDay wrote:
>
>> because of https://github.com/llvm/llvm-project/issues/61785 should this really be reverted?  is basically saying `X * Y {`  must be `X *Y{`  but that obviously not the case
>
> Tricky one. Any ideas on how we could differentiate those two cases? Maybe impossible? Not sure what the normal way to handle ambiguous things like that in clang-format is.

We can add a `Types` option similar to `StatementMacros`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137327



More information about the cfe-commits mailing list