diff options
Diffstat (limited to 'clang/lib/AST/ExprCXX.cpp')
-rw-r--r-- | clang/lib/AST/ExprCXX.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp index 684853492e3..b76bc2f2849 100644 --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -1027,13 +1027,13 @@ CXXRecordDecl *LambdaExpr::getLambdaClass() const { CXXMethodDecl *LambdaExpr::getCallOperator() const { CXXRecordDecl *Record = getLambdaClass(); - return Record->getLambdaCallOperator(); -} - -TemplateParameterList *LambdaExpr::getTemplateParameterList() const { - CXXRecordDecl *Record = getLambdaClass(); - return Record->getGenericLambdaTemplateParameterList(); - + DeclarationName Name + = Record->getASTContext().DeclarationNames.getCXXOperatorName(OO_Call); + DeclContext::lookup_result Calls = Record->lookup(Name); + 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; } CompoundStmt *LambdaExpr::getBody() const { |