[PATCH] D80171: [analyzer] LoopUnrolling: fix crash when a parameter is a loop counter
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 19 05:55:03 PDT 2020
xazax.hun added inline comments.
================
Comment at: clang/test/Analysis/loop-unrolling.cpp:503
+
+void arg_as_loop_counter(int i) {
+ for (i = 0; i < 10; ++i) {
----------------
nit: we usually use `arg` for actual arguments at the call site, and use `param` for formal parameters. The test function should be renamed accordingly. Also, it would be great to add `clang_analyzer_numTimesReached()` to demonstrate whether the loop is actually unrolled or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80171/new/
https://reviews.llvm.org/D80171
More information about the cfe-commits
mailing list