diff options
author | martinboehme <mboehme@google.com> | 2024-01-18 08:59:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 08:59:26 +0100 |
commit | f1226eea52e21b6325cf24cf0d7ccd6a517baee5 (patch) | |
tree | 3905306dea295645678c49e530112e1d2d78fa54 /clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | |
parent | 1b1b5251479c42c793b14fb9588545f9619b85d6 (diff) | |
download | llvm-f1226eea52e21b6325cf24cf0d7ccd6a517baee5.zip llvm-f1226eea52e21b6325cf24cf0d7ccd6a517baee5.tar.gz llvm-f1226eea52e21b6325cf24cf0d7ccd6a517baee5.tar.bz2 |
[clang][dataflow] Consider `CXXDefaultInitExpr` to be an "original record ctor". (#78423)
The CFG doesn't contain a CFGElement for the
`CXXDefaultInitExpr::getInit()`, so
it makes sense to consider the `CXXDefaultInitExpr` to be the expression
that
originally constructs the object.
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp')
-rw-r--r-- | clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp index 57572e5..07dc3a9 100644 --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -747,6 +747,7 @@ static bool isOriginalRecordConstructor(const Expr &RecordPRValue) { return !Init->isSemanticForm() || !Init->isTransparent(); return isa<CXXConstructExpr>(RecordPRValue) || isa<CallExpr>(RecordPRValue) || isa<LambdaExpr>(RecordPRValue) || + isa<CXXDefaultInitExpr>(RecordPRValue) || // The framework currently does not propagate the objects created in // the two branches of a `ConditionalOperator` because there is no way // to reconcile their storage locations, which are different. We |