aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-15 23:55:21 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-15 23:55:21 +0000
commit399ad970a25efcbfa7111e17f48285a70fba2731 (patch)
tree4b6ea570d460e64a8fbcf585d8a89ddc3bdc8fbf /lib/Sema/SemaDeclCXX.cpp
parent46e392ae6d09979b087d7b1aca3b816ba4199b89 (diff)
Check for unexpanded parameter packs in static assertion expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index d538715917..555f5fd424 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -6175,6 +6175,9 @@ Decl *Sema::ActOnStaticAssertDeclaration(SourceLocation AssertLoc,
}
}
+ if (DiagnoseUnexpandedParameterPack(AssertExpr, UPPC_StaticAssertExpression))
+ return 0;
+
Decl *Decl = StaticAssertDecl::Create(Context, CurContext, AssertLoc,
AssertExpr, AssertMessage);