File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -109,16 +109,27 @@ class alignas(void *) Stmt {
109109
110110 // ===--- Statement bitfields classes ---===//
111111
112+ enum { NumStmtBits = 9 };
113+
114+ #define STMT (CLASS, PARENT )
115+ #define STMT_RANGE (BASE, FIRST, LAST )
116+ #define LAST_STMT_RANGE (BASE, FIRST, LAST ) \
117+ static_assert ( \
118+ llvm::isInt<NumStmtBits>(StmtClass::LAST##Class), \
119+ " The number of 'StmtClass'es is strictly bounded under two to " \
120+ " the power of 'NumStmtBits'" );
121+ #define ABSTRACT_STMT (STMT )
122+ #include " clang/AST/StmtNodes.inc"
123+
112124 class StmtBitfields {
113125 friend class ASTStmtReader ;
114126 friend class ASTStmtWriter ;
115127 friend class Stmt ;
116128
117129 // / The statement class.
118130 LLVM_PREFERRED_TYPE (StmtClass)
119- unsigned sClass : 8 ;
131+ unsigned sClass : NumStmtBits ;
120132 };
121- enum { NumStmtBits = 8 };
122133
123134 class NullStmtBitfields {
124135 friend class ASTStmtReader ;
You can’t perform that action at this time.
0 commit comments