diff options
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
-rw-r--r-- | clang/lib/AST/ExprCXX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp index 1dc7de1b4db..6c66c90cd49 100644 --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -964,9 +964,9 @@ CXXMethodDecl *LambdaExpr::getCallOperator() const { DeclarationName Name = Record->getASTContext().DeclarationNames.getCXXOperatorName(OO_Call); DeclContext::lookup_result Calls = Record->lookup(Name); - assert(Calls.first != Calls.second && "Missing lambda call operator!"); - CXXMethodDecl *Result = cast<CXXMethodDecl>(*Calls.first++); - assert(Calls.first == Calls.second && "More than lambda one call operator?"); + assert(!Calls.empty() && "Missing lambda call operator!"); + assert(Calls.size() == 1 && "More than one lambda call operator!"); + CXXMethodDecl *Result = cast<CXXMethodDecl>(Calls.front()); return Result; } |