diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-12-16 00:46:58 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-12-16 00:46:58 +0000 |
commit | 56c04588ef3cfa1bbc968fd68de2480a4e66971d (patch) | |
tree | a173c0b5da0ca60b5b2d40d7e8eb49674e7fac27 /lib/Sema/SemaDecl.cpp | |
parent | 0c9e4799fd78d350a037498b2c797f2b2558791c (diff) |
Check for unexpanded parameter packs in using declarations. As a
drive-by, make sure to check for unexpanded parameter packs within the
name of a declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 95c3b99801..c3384a5162 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2319,7 +2319,8 @@ Decl *Sema::HandleDeclarator(Scope *S, Declarator &D, diag::err_declarator_need_ident) << D.getDeclSpec().getSourceRange() << D.getSourceRange(); return 0; - } + } else if (DiagnoseUnexpandedParameterPack(NameInfo, UPPC_DeclarationType)) + return 0; // The scope passed in may not be a decl scope. Zip up the scope tree until // we find one that is. |