[Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`
authorAdam Balogh <adam.balogh@ericsson.com>
Wed, 20 May 2020 12:58:37 +0000 (14:58 +0200)
committerAdam Balogh <adam.balogh@ericsson.com>
Tue, 9 Jun 2020 10:08:56 +0000 (12:08 +0200)
commit813734dad7e8b526c39806d1a88820b1f0706fb1
tree109730750a40c3e141817c3bc55664df58dd023d
parent17798c60bcc284e45529d6afde11bf59ffc549c8
[Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

Checkers should be able to get the return value under construction for a
`CallEvenet`. This patch adds a function to achieve this which retrieves
the return value from the construction context of the call.

Differential Revision: https://reviews.llvm.org/D80366
clang/include/clang/Analysis/AnalysisDeclContext.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
clang/lib/StaticAnalyzer/Core/CallEvent.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/unittests/StaticAnalyzer/CMakeLists.txt
clang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp [new file with mode: 0644]