[PATCH] D145617: [clang-tidy] Add readability-avoid-unconditional-preprocessor-if check

Piotr Zegar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 8 21:56:15 PST 2023


PiotrZSL added a comment.

There are 186 findings from this check in llvm repository, no false-positives.

Example:

  llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:2071:2: warning: preprocessor condition is always 'true', consider removing condition but leaving its contents [readability-avoid-unconditional-preprocessor-if]
  clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp:400:2: warning: preprocessor condition is always 'false', consider removing both the condition and its contents [readability-avoid-unconditional-preprocessor-if]


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145617



More information about the cfe-commits mailing list