[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 7 08:29:20 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:425
   Finder->addMatcher(
-      ifStmt(isExpansionInMainFile(),
              hasCondition(cxxBoolLiteral(equals(Value)).bind(BooleanId)))
----------------
This is changing the behavior so that now it will diagnose in header files, no? Why is the correct change to replace this with `unless(isInTemplateInstantiation())` instead of adding the new matcher?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81336





More information about the cfe-commits mailing list