Changeset b6f2e7ab for src/AST/Util.cpp
- Timestamp:
- Sep 9, 2024, 5:15:32 PM (37 hours ago)
- Branches:
- master
- Children:
- f5dbc8d
- Parents:
- 5c6d439
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Util.cpp
r5c6d439 rb6f2e7ab 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 … … 163 154 void previsit( const SizeofExpr * node ) { 164 155 previsit( (const ParseNode *)node ); 165 oneOfExprOrType( node );166 156 } 167 157 168 158 void previsit( const AlignofExpr * node ) { 169 159 previsit( (const ParseNode *)node ); 170 oneOfExprOrType( node );171 160 } 172 161
Note: See TracChangeset
for help on using the changeset viewer.