[PATCH] D26589: Add static analyzer checker for finding infinite recursion

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 18 17:30:58 PST 2016


NoQ added inline comments.


================
Comment at: lib/StaticAnalyzer/Checkers/RecursionChecker.cpp:65
+
+  for (const auto *ParentLC = C.getStackFrame()->getParent();
+       ParentLC != nullptr; ParentLC = ParentLC->getParent()) {
----------------
Off-by-1: `C.getStackFrame()` is already the caller context, which we should check.


https://reviews.llvm.org/D26589





More information about the cfe-commits mailing list