diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-23 01:41:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-08-23 01:41:48 +0000 |
commit | 148028f12f2c1ece09e75344d88d2f96aafb4d9a (patch) | |
tree | fe95a5ff633f5688ec8d6a93362426c9b64a3b4f /lib/Sema/SemaLambda.cpp | |
parent | 272b5247eb1b7e7c3784b24a0dc9dc996527b0fc (diff) | |
download | clang-148028f12f2c1ece09e75344d88d2f96aafb4d9a.tar.gz |
PR42587: diagnose unexpanded uses of a pack parameter of a generic
lambda from within the lambda-declarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLambda.cpp')
-rw-r--r-- | lib/Sema/SemaLambda.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp index e7c51a3e3d..6938804e5f 100644 --- a/lib/Sema/SemaLambda.cpp +++ b/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()) - ContainsUnexpandedParameterPack = true; + DiagnoseUnexpandedParameterPack(Intro.Range.getBegin(), MethodTyInfo, + UPPC_DeclarationType); } CXXRecordDecl *Class = createLambdaClosureType(Intro.Range, MethodTyInfo, KnownDependent, Intro.Default); - CXXMethodDecl *Method = startLambdaDefinition(Class, Intro.Range, MethodTyInfo, EndLoc, Params, ParamInfo.getDeclSpec().getConstexprSpecifier()); |