[PATCH] D128401: [clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker
Richard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 09:53:50 PDT 2022
LegalizeAdulthood added inline comments.
Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:190
+ containsFunc |= (CanDecl == Func);
+ overlap |= Callees.contains(CanDecl);
Personally I'm not a fan of using bitwise operators with booleans. It involves implicit casts of bool to int and int to bool and doesn't use the usual short-circuiting logic of `||` and `&&`. It also means this code won't be analyzed by clang-tidy as "performing operations on booleans" for things like `readability-simplify-boolean-expr`.
CHANGES SINCE LAST ACTION
More information about the cfe-commits