chaitanyav added a comment. In D147844#4293299 <https://reviews.llvm.org/D147844#4293299>, @cjdb wrote:
> I think this is a good diagnostic to add: it improves readability and > eliminates ambiguities. My only request is that if there isn't already a > FixIt hint, one be added, please. @cjb quick question, should we restrict to >, <, >=, <= I am finding lots of files in the project with ` ==` and `?:` precedence warnings. ================ Comment at: clang/test/Sema/parentheses.c:94 (void)(x + y > 0 ? 1 : 2); // no warning (void)(x + (y > 0) ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '+'}} expected-note 2{{place parentheses}} ---------------- cjdb wrote: > I think this should also warn. @cjdb am looking into this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits