[clang-tidy] Fixing a bug in `InfiniteLoopCheck` that raises false alarms on finite loops
A loop can recursively increase/decrease a function local static variable and make itself finite. For example, ``` void f() { static int i = 0; i++; while (i < 10) f(); } ``` Such cases are not considered by `InfiniteLoopCheck`. This commit fixes this problem by detecting usages of static local variables and recursions. Reviewed by: NoQ, njames93 Differential Revision: https://reviews.llvm.org/D128401
Loading
Please sign in to comment