Changes in src/AST/Util.cpp [bfeb37a6:14c0f7b]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Util.cpp
rbfeb37a6 r14c0f7b 104 104 } 105 105 assertf( false, "Member not found." ); 106 }107 108 template<typename node_t>109 void oneOfExprOrType( const node_t * node ) {110 if ( node->expr ) {111 assertf( node->expr && !node->type, "Exactly one of expr or type should be set." );112 } else {113 assertf( !node->expr && node->type, "Exactly one of expr or type should be set." );114 }115 106 } 116 107 … … 161 152 } 162 153 163 void previsit( const SizeofExpr * node ) {164 previsit( (const ParseNode *)node );165 oneOfExprOrType( node );166 }167 168 void previsit( const AlignofExpr * node ) {169 previsit( (const ParseNode *)node );170 oneOfExprOrType( node );171 }172 173 154 void previsit( const StructInstType * node ) { 174 155 previsit( (const Node *)node ); … … 200 181 /// referring to is in scope by the structural rules of code. 201 182 // Any escapes marked with a bug should be removed once the bug is fixed. 202 // This is a separate pass because of it changes the visit pattern and203 // must always be run on the entire translation unit.204 183 struct InScopeCore : public ast::WithShortCircuiting { 205 184 ScopedSet<DeclWithType const *> typedDecls;
Note: See TracChangeset
for help on using the changeset viewer.