[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 13 08:06:58 PST 2024


================
@@ -277,6 +277,9 @@ class SimplifyBooleanExprCheck::Visitor : public RecursiveASTVisitor<Visitor> {
   }
 
   bool dataTraverseStmtPre(Stmt *S) {
+    if (Check->IgnoreMacros && S->getBeginLoc().isMacroID()) {
----------------
PiotrZSL wrote:

what if S is nullptr ? it will crash, move S verification from line 283 up.

https://github.com/llvm/llvm-project/pull/78043


More information about the cfe-commits mailing list