summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-03-15 18:54:13 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-03-15 18:54:13 +0000
commita939c23aec6bf9a760e722745b41360afadbe8bf (patch)
tree060cc60fabdf74879bd8b95174cdf6a918496b81 /clang/lib/AST/Decl.cpp
parent86c7741f68297cab233a12b44408a463f71aeee6 (diff)
downloadbcm5719-llvm-a939c23aec6bf9a760e722745b41360afadbe8bf.tar.gz
bcm5719-llvm-a939c23aec6bf9a760e722745b41360afadbe8bf.zip
Make some assertions on constant expressions static.
llvm-svn: 204012
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 038c7acb0f8..a61af50c480 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1613,8 +1613,10 @@ VarDecl::VarDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc,
SourceLocation IdLoc, IdentifierInfo *Id, QualType T,
TypeSourceInfo *TInfo, StorageClass SC)
: DeclaratorDecl(DK, DC, IdLoc, Id, T, TInfo, StartLoc), Init() {
- assert(sizeof(VarDeclBitfields) <= sizeof(unsigned));
- assert(sizeof(ParmVarDeclBitfields) <= sizeof(unsigned));
+ static_assert(sizeof(VarDeclBitfields) <= sizeof(unsigned),
+ "VarDeclBitfields too large!");
+ static_assert(sizeof(ParmVarDeclBitfields) <= sizeof(unsigned),
+ "ParmVarDeclBitfields too large!");
AllBits = 0;
VarDeclBits.SClass = SC;
// Everything else is implicitly initialized to false.
OpenPOWER on IntegriCloud