[clang][dataflow] Analyze constructor bodies
authorSam Estep <sam@samestep.com>
Wed, 10 Aug 2022 14:01:18 +0000 (14:01 +0000)
committerWei Yi Tee <wyt@google.com>
Thu, 11 Aug 2022 12:46:20 +0000 (12:46 +0000)
commiteb91fd5cbc6995099bd38c04c839686cbdd18b92
tree4c87861051117045f81e49e58ecf7e86610855df
parentf9563967cadf40af043fa820f9baaaefecb023b6
[clang][dataflow] Analyze constructor bodies

This patch adds the ability to context-sensitively analyze constructor bodies, by changing `pushCall` to allow both `CallExpr` and `CXXConstructExpr`, and extracting the main context-sensitive logic out of `VisitCallExpr` into a new `transferInlineCall` method which is now also called at the end of `VisitCXXConstructExpr`.

Reviewed By: ymandel, sgatev, xazax.hun

Differential Revision: https://reviews.llvm.org/D131438
clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
clang/lib/Analysis/FlowSensitive/Transfer.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp