[PATCH] D128401: [clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 22:54:17 PDT 2022


njames93 accepted this revision.
njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:166
+  }
+  if (const auto *Call = dyn_cast<ObjCMessageExpr>(StmtNode)) {
+    const Decl *Callee = Call->getMethodDecl();
----------------



================
Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:194
+  }
+  return ContainsFunc && Overlap;
+}
----------------
This will always be false as if it's true, the loop would return.


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

https://reviews.llvm.org/D128401



More information about the cfe-commits mailing list