aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
diff options
context:
space:
mode:
authorPasquale Riello <pas.riello@gmail.com>2024-07-26 14:39:03 +0100
committerGitHub <noreply@github.com>2024-07-26 15:39:03 +0200
commit49cb1701389ac3cff3e2c552531bfd3a607311d8 (patch)
tree1a7d2cf99528245d2b86bd2e64fdc1e4f93320f8 /clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
parentf2a0f97f7e5094154a8b9cd104085a117e63f5d2 (diff)
downloadllvm-49cb1701389ac3cff3e2c552531bfd3a607311d8.zip
llvm-49cb1701389ac3cff3e2c552531bfd3a607311d8.tar.gz
llvm-49cb1701389ac3cff3e2c552531bfd3a607311d8.tar.bz2
[clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (#99616)
`CXXInheritedCtorInitExpr` is another of the node kinds that should be considered an "original initializer". An assertion failure in `assert(Children.size() == 1)` happens without this fix. --------- Co-authored-by: martinboehme <mboehme@google.com>
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp')
-rw-r--r--clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
index 8d7fe18..e1f68e4 100644
--- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
+++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
@@ -416,7 +416,7 @@ public:
// below them can initialize the same object (or part of it).
if (isa<CXXConstructExpr>(E) || isa<CallExpr>(E) || isa<LambdaExpr>(E) ||
isa<CXXDefaultArgExpr>(E) || isa<CXXStdInitializerListExpr>(E) ||
- isa<AtomicExpr>(E) ||
+ isa<AtomicExpr>(E) || isa<CXXInheritedCtorInitExpr>(E) ||
// We treat `BuiltinBitCastExpr` as an "original initializer" too as
// it may not even be casting from a record type -- and even if it is,
// the two objects are in general of unrelated type.