localspook wrote:

> > Clang-format has [an option like 
> > this](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#removeparentheses)
> >  already. Unlike clang-format, we have full semantic information, so this 
> > check has the potential to be more reliable, but I’m concerned about 
> > duplicating functionality. What do you think?
> 
> I don't see a problem in duplicating functionality given `clang-tidy` would 
> have fever false-positives. We already have 
> https://clang.llvm.org/docs/ClangFormatStyleOptions.html#insertbraces vs 
> https://clang.llvm.org/extra/clang-tidy/checks/readability/braces-around-statements.html
> 
> Generally speaking, if `clang-format` option has warning `Setting this option 
> to true could lead to incorrect code formatting due to clang-format’s lack of 
> complete semantic information`, I doubt it will be ever enforced in CI but 
> same `clang-tidy` check could be in CI.

That sounds reasonable, thank you

https://github.com/llvm/llvm-project/pull/159911
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to