diff options
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r-- | clang/lib/Analysis/CFG.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 0f0556135c2..34d40162275 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -736,12 +736,12 @@ private: if (BuildOpts.AddRichCXXConstructors) { if (const ConstructionContextLayer *Layer = ConstructionContextMap.lookup(CE)) { - const ConstructionContext *CC = - ConstructionContext::createFromLayers(cfg->getBumpVectorContext(), - Layer); - B->appendConstructor(CE, CC, cfg->getBumpVectorContext()); cleanupConstructionContext(CE); - return; + if (const auto *CC = ConstructionContext::createFromLayers( + cfg->getBumpVectorContext(), Layer)) { + B->appendConstructor(CE, CC, cfg->getBumpVectorContext()); + return; + } } } @@ -757,12 +757,12 @@ private: if (CFGCXXRecordTypedCall::isCXXRecordTypedCall(CE, *Context)) { if (const ConstructionContextLayer *Layer = ConstructionContextMap.lookup(CE)) { - const ConstructionContext *CC = - ConstructionContext::createFromLayers(cfg->getBumpVectorContext(), - Layer); - B->appendCXXRecordTypedCall(CE, CC, cfg->getBumpVectorContext()); cleanupConstructionContext(CE); - return; + if (const auto *CC = ConstructionContext::createFromLayers( + cfg->getBumpVectorContext(), Layer)) { + B->appendCXXRecordTypedCall(CE, CC, cfg->getBumpVectorContext()); + return; + } } } } |