[all-commits] [llvm/llvm-project] 0eaecb: [clang][dataflow] Handle return statements
Sam Estep via All-commits
all-commits at lists.llvm.org
Thu Aug 4 10:42:32 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0eaecbbc231883b43d3ac761b276d9f505c89c27
https://github.com/llvm/llvm-project/commit/0eaecbbc231883b43d3ac761b276d9f505c89c27
Author: Sam Estep <sam at samestep.com>
Date: 2022-08-04 (Thu, 04 Aug 2022)
Changed paths:
M clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
M clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
M clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
M clang/lib/Analysis/FlowSensitive/Transfer.cpp
M clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
Log Message:
-----------
[clang][dataflow] Handle return statements
This patch adds a `ReturnLoc` field to the `Environment`, serving a similar to the `ThisPointeeLoc` field in the `DataflowAnalysisContext`. It then uses that (along with a new `VisitReturnStmt` method in `TransferVisitor`) to handle non-`void`-returning functions in context-sensitive analysis.
Reviewed By: ymandel, sgatev
Differential Revision: https://reviews.llvm.org/D130600
More information about the All-commits
mailing list