[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 10:52:57 PDT 2023


aaron.ballman added a comment.

In D147844#4299418 <https://reviews.llvm.org/D147844#4299418>, @chaitanyav wrote:

> @aaron.ballman just for learning, can you point me to the code where a warning is selectively enabled/disabled based on a flag. For e.g. -Wunused-comparison

Sure! This is handled automagically for you by tablegen when you use `DefaultIgnore` while defining the diagnostic, as in: https://github.com/llvm/llvm-project/blob/c4505158950f2211d8c4b429049f2cd765f3e092/clang/include/clang/Basic/DiagnosticSemaKinds.td#L28


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147844



More information about the cfe-commits mailing list