]> granicus.if.org Git - clang/commit
[analyzer] Expose return statement from CallExit program point
authorGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 2 Feb 2018 02:19:43 +0000 (02:19 +0000)
committerGeorge Karpenkov <ekarpenkov@apple.com>
Fri, 2 Feb 2018 02:19:43 +0000 (02:19 +0000)
commit5885c75b8cfb19ed8ab6b4b7c4cec8fc5207cf13
treeef2f1ba6c399182aa3f6389bd120d00a097a32c0
parent2794a6b57007336f5178ccce6cb06ad60093c919
[analyzer] Expose return statement from CallExit program point

If the return statement is stored, we might as well allow querying
against it.
Also fix the bug where the return statement is not stored
if there is no return value.
This change un-merges two ExplodedNodes during call exit when the state
is otherwise identical - the CallExitBegin node itself and the "Bind
Return Value"-tagged node.
And expose the return statement through
getStatement helper function.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324052 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/ProgramPoint.h
lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
lib/StaticAnalyzer/Core/CoreEngine.cpp
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/return-stmt-merge.cpp [new file with mode: 0644]