diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-21 02:45:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-21 02:45:19 +0000 |
commit | cf4bdde33a0450f212e7577b71a7bcfe5213cb15 (patch) | |
tree | 0f26b261f986553682e4a0eb67867313b41c15f5 /clang/lib/AST/DeclCXX.cpp | |
parent | 8d981962c043ed5111f8e941a1501e100e54f8f7 (diff) | |
download | bcm5719-llvm-cf4bdde33a0450f212e7577b71a7bcfe5213cb15.tar.gz bcm5719-llvm-cf4bdde33a0450f212e7577b71a7bcfe5213cb15.zip |
Cleanup: remove artificial division between lookup results and const lookup
results. No-one was ever modifying a lookup result, and it would not be
reasonable to do so.
llvm-svn: 230123
Diffstat (limited to 'clang/lib/AST/DeclCXX.cpp')
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 536a1453aaa..87a063438bc 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -991,7 +991,7 @@ CXXMethodDecl* CXXRecordDecl::getLambdaCallOperator() const { if (!isLambda()) return nullptr; DeclarationName Name = getASTContext().DeclarationNames.getCXXOperatorName(OO_Call); - DeclContext::lookup_const_result Calls = lookup(Name); + DeclContext::lookup_result Calls = lookup(Name); assert(!Calls.empty() && "Missing lambda call operator!"); assert(Calls.size() == 1 && "More than one lambda call operator!"); @@ -1008,7 +1008,7 @@ CXXMethodDecl* CXXRecordDecl::getLambdaStaticInvoker() const { if (!isLambda()) return nullptr; DeclarationName Name = &getASTContext().Idents.get(getLambdaStaticInvokerName()); - DeclContext::lookup_const_result Invoker = lookup(Name); + DeclContext::lookup_result Invoker = lookup(Name); if (Invoker.empty()) return nullptr; assert(Invoker.size() == 1 && "More than one static invoker operator!"); NamedDecl *InvokerFun = Invoker.front(); @@ -1307,7 +1307,7 @@ CXXDestructorDecl *CXXRecordDecl::getDestructor() const { = Context.DeclarationNames.getCXXDestructorName( Context.getCanonicalType(ClassType)); - DeclContext::lookup_const_result R = lookup(Name); + DeclContext::lookup_result R = lookup(Name); if (R.empty()) return nullptr; @@ -1490,8 +1490,8 @@ bool CXXMethodDecl::isUsualDeallocationFunction() const { // This function is a usual deallocation function if there are no // single-parameter deallocation functions of the same kind. - DeclContext::lookup_const_result R = getDeclContext()->lookup(getDeclName()); - for (DeclContext::lookup_const_result::iterator I = R.begin(), E = R.end(); + DeclContext::lookup_result R = getDeclContext()->lookup(getDeclName()); + for (DeclContext::lookup_result::iterator I = R.begin(), E = R.end(); I != E; ++I) { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) if (FD->getNumParams() == 1) |