aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ParentMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ParentMap.cpp')
-rw-r--r--clang/lib/AST/ParentMap.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ParentMap.cpp b/clang/lib/AST/ParentMap.cpp
index 2ff5c9d8aeb5..da21e573c320 100644
--- a/clang/lib/AST/ParentMap.cpp
+++ b/clang/lib/AST/ParentMap.cpp
@@ -133,8 +133,7 @@ void ParentMap::setParent(const Stmt *S, const Stmt *Parent) {
Stmt* ParentMap::getParent(Stmt* S) const {
MapTy* M = (MapTy*) Impl;
- MapTy::iterator I = M->find(S);
- return I == M->end() ? nullptr : I->second;
+ return M->lookup(S);
}
Stmt *ParentMap::getParentIgnoreParens(Stmt *S) const {