Revert "Implement a rudimentary form of generic lambdas."
This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index aab0389..6cc596c 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -1007,17 +1007,10 @@
BlockScope, Block));
}
-void Sema::PushLambdaScope() {
- FunctionScopes.push_back(new LambdaScopeInfo(getDiagnostics()));
-}
-
-void Sema::RecordParsingTemplateParameterDepth(unsigned Depth) {
- if (LambdaScopeInfo *const LSI = getCurLambda()) {
- LSI->AutoTemplateParameterDepth = Depth;
- return;
- }
- assert(false &&
- "Remove assertion if intentionally called in a non-lambda context.");
+void Sema::PushLambdaScope(CXXRecordDecl *Lambda,
+ CXXMethodDecl *CallOperator) {
+ FunctionScopes.push_back(new LambdaScopeInfo(getDiagnostics(), Lambda,
+ CallOperator));
}
void Sema::PopFunctionScopeInfo(const AnalysisBasedWarnings::Policy *WP,
@@ -1073,16 +1066,6 @@
return dyn_cast<LambdaScopeInfo>(FunctionScopes.back());
}
-// We have a generic lambda if we parsed auto parameters, or we have
-// an associated template parameter list.
-LambdaScopeInfo *Sema::getCurGenericLambda() {
- if (LambdaScopeInfo *LSI = getCurLambda()) {
- return (LSI->AutoTemplateParams.size() ||
- LSI->GLTemplateParameterList) ? LSI : 0;
- }
- return 0;
-}
-
void Sema::ActOnComment(SourceRange Comment) {
if (!LangOpts.RetainCommentsFromSystemHeaders &&