summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/ConstructionContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/ConstructionContext.cpp')
-rw-r--r--clang/lib/Analysis/ConstructionContext.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/ConstructionContext.cpp b/clang/lib/Analysis/ConstructionContext.cpp
index 9f3c00b2bc9..8656a1bbe09 100644
--- a/clang/lib/Analysis/ConstructionContext.cpp
+++ b/clang/lib/Analysis/ConstructionContext.cpp
@@ -79,6 +79,9 @@ const ConstructionContext *ConstructionContext::createFromLayers(
ParentLayer->getTriggerStmt()))) {
return create<TemporaryObjectConstructionContext>(C, BTE, MTE);
}
+ // This is a constructor into a function argument. Not implemented yet.
+ if (auto *CE = dyn_cast<CallExpr>(ParentLayer->getTriggerStmt()))
+ return nullptr;
// This is C++17 copy-elided construction into return statement.
if (auto *RS = dyn_cast<ReturnStmt>(ParentLayer->getTriggerStmt())) {
assert(!RS->getRetValue()->getType().getCanonicalType()
@@ -114,6 +117,9 @@ const ConstructionContext *ConstructionContext::createFromLayers(
assert(TopLayer->isLast());
return create<SimpleReturnedValueConstructionContext>(C, RS);
}
+ // This is a constructor into a function argument. Not implemented yet.
+ if (auto *CE = dyn_cast<CallExpr>(TopLayer->getTriggerStmt()))
+ return nullptr;
llvm_unreachable("Unexpected construction context with statement!");
} else if (const CXXCtorInitializer *I = TopLayer->getTriggerInit()) {
assert(TopLayer->isLast());
OpenPOWER on IntegriCloud