diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-23 02:33:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-23 02:33:46 +0000 |
commit | fefdc9371be1b8cd7c23fdabb8d775db315833f8 (patch) | |
tree | 1c22af855c18b27f2eb62208b1bb4ed700256a7b /clang/lib/Sema | |
parent | 3fc933af8b49519658e4c2fd82f93c6d680c8a08 (diff) | |
download | bcm5719-llvm-fefdc9371be1b8cd7c23fdabb8d775db315833f8.tar.gz bcm5719-llvm-fefdc9371be1b8cd7c23fdabb8d775db315833f8.zip |
Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" due to buildbot breakage.
This reverts commit r369722.
llvm-svn: 369725
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaTemplateVariadic.cpp | 9 |
2 files changed, 3 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 6938804e5f1..e7c51a3e3d9 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -928,12 +928,12 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, // Check for unexpanded parameter packs in the method type. if (MethodTyInfo->getType()->containsUnexpandedParameterPack()) - DiagnoseUnexpandedParameterPack(Intro.Range.getBegin(), MethodTyInfo, - UPPC_DeclarationType); + ContainsUnexpandedParameterPack = true; } CXXRecordDecl *Class = createLambdaClosureType(Intro.Range, MethodTyInfo, KnownDependent, Intro.Default); + CXXMethodDecl *Method = startLambdaDefinition(Class, Intro.Range, MethodTyInfo, EndLoc, Params, ParamInfo.getDeclSpec().getConstexprSpecifier()); diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp index b766e3c5686..f90bff6e7ac 100644 --- a/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -313,17 +313,10 @@ Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc, if (auto *LSI = dyn_cast<sema::LambdaScopeInfo>(Func)) { if (N == FunctionScopes.size()) { - const DeclContext *LambdaDC = LSI->CallOperator; - // While we're parsing the lambda-declarator, we don't have a call - // operator yet and the parameters instead get temporarily attached - // to the translation unit. - if (!LambdaDC) - LambdaDC = Context.getTranslationUnitDecl(); - for (auto &Pack : Unexpanded) { auto *VD = dyn_cast_or_null<VarDecl>( Pack.first.dyn_cast<NamedDecl *>()); - if (VD && VD->getDeclContext() == LambdaDC) + if (VD && VD->getDeclContext() == LSI->CallOperator) LambdaParamPackReferences.push_back(Pack); } } |