owenpan added a comment.

In D95168#3102550 <https://reviews.llvm.org/D95168#3102550>, @MyDeveloperDay 
wrote:

> This is a demo of what I mean {https://reviews.llvm.org/D113000} you can see 
> its pretty aggressive, I could kind of imagine people wanting a little more 
> control
>
> Sometimes this feels inconsistent
>
> F20029866: image.png <https://reviews.llvm.org/F20029866>
>
> and in this case the expression seem so separated from the if() that you 
> might want to keep the {}
>
> F20029887: image.png <https://reviews.llvm.org/F20029887>

In my experience, the simplest thing to do is to remove all optional braces as 
allowed by the language syntax. When you want to add exceptions for matching 
if-else braces, avoiding dangling-else warnings, etc, things get much more 
complicated very quickly. :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95168

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to