diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-15 19:01:55 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-02-15 19:01:55 +0000 |
commit | 5bb02f3c0209b53c10de63fd1c06b07eb5490e21 (patch) | |
tree | 5ee4d0db62e643c4a847919b9f7b454290214077 /clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | |
parent | 81631a2609b731bc7b4bf3cbd719d035e89ef1f4 (diff) | |
download | bcm5719-llvm-5bb02f3c0209b53c10de63fd1c06b07eb5490e21.tar.gz bcm5719-llvm-5bb02f3c0209b53c10de63fd1c06b07eb5490e21.zip |
[analyzer] NFC: Eliminate ParentMap lookup in mayInlineCallKind().
Don't look at the parent statement to figure out if the cxx-allocator-inlining
flag should kick in and prevent us from inlining the constructor within
a new-expression. We now have construction contexts for that purpose.
llvm-svn: 325278
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index bdf5555b2e5..107debdd4c4 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp @@ -109,10 +109,7 @@ ExprEngine::getRegionForConstructedObject(const CXXConstructExpr *CE, // See if we're constructing an existing region by looking at the // current construction context. - const NodeBuilderContext &CurrBldrCtx = getBuilderContext(); - const CFGBlock *B = CurrBldrCtx.getBlock(); - const CFGElement &E = (*B)[currStmtIdx]; - if (auto CC = E.getAs<CFGConstructor>()) { + if (auto CC = getCurrentCFGElement().getAs<CFGConstructor>()) { if (const Stmt *TriggerStmt = CC->getTriggerStmt()) { if (const CXXNewExpr *CNE = dyn_cast<CXXNewExpr>(TriggerStmt)) { if (AMgr.getAnalyzerOptions().mayInlineCXXAllocator()) { |