[Analyzer] Allow creation of stack frame for functions without definition
authorAdam Balogh <adam.balogh@ericsson.com>
Mon, 11 May 2020 13:00:42 +0000 (15:00 +0200)
committerAdam Balogh <adam.balogh@ericsson.com>
Tue, 9 Jun 2020 10:08:57 +0000 (12:08 +0200)
commit5419a3121522fe1251d52c7f1fb790d68581e549
tree0a7a7d63bbb705840c445b2c6719a450ce9b907b
parent98db1f990fc273adc1ae36d4ce97ce66fd27ac30
[Analyzer] Allow creation of stack frame for functions without definition

Retrieving the parameter location of functions was disabled because it
may causes crashes due to the fact that functions may have multiple
declarations and without definition it is difficult to ensure that
always the same declration is used. Now parameters are stored in
`ParamRegions` which are independent of the declaration of the function,
therefore the same parameters always have the same regions,
independently of the function declaration used actually. This allows us
to remove the limitation described above.

Differential Revision: https://reviews.llvm.org/D80286
clang/lib/StaticAnalyzer/Core/CallEvent.cpp
clang/test/Analysis/explain-svals.cpp
clang/test/Analysis/temporaries.cpp
clang/unittests/StaticAnalyzer/ParamRegionTest.cpp