HomePhabricator

[analyzer] LoopUnrolling: fix crash when a parameter is a loop counter.

Authored by dergachev.a on May 22 2020, 4:53 AM.

Description

[analyzer] LoopUnrolling: fix crash when a parameter is a loop counter.

When loop counter is a function parameter "isPossiblyEscaped" will not find
the variable declaration which lead to hitting "llvm_unreachable".
Parameters of reference type should be escaped like global variables;
otherwise treat them as unescaped.

Patch by Abbas Sabra!

Differential Revision: https://reviews.llvm.org/D80171

Details