Changeset f855545 for src/Parser/TypeData.cc
- Timestamp:
- Nov 2, 2018, 7:46:19 AM (4 years ago)
- Branches:
- aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- c45b304
- Parents:
- 30ee9ef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r30ee9ef rf855545 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 14:39:31201813 // Update Count : 62 212 // Last Modified On : Thu Nov 1 20:56:14 2018 13 // Update Count : 623 14 14 // 15 15 … … 96 96 break; 97 97 case Typeof: 98 case Basetypeof: 98 99 // typeexpr = new Typeof_t; 99 100 typeexpr = nullptr; … … 166 167 break; 167 168 case Typeof: 169 case Basetypeof: 168 170 // delete typeexpr->expr; 169 171 delete typeexpr; … … 245 247 break; 246 248 case Typeof: 249 case Basetypeof: 247 250 newtype->typeexpr = maybeClone( typeexpr ); 248 251 break; … … 419 422 } // if 420 423 break; 424 case Basetypeof: 425 os << "base-"; 426 __attribute__((fallthrough)); 421 427 case Typeof: 422 428 os << "type-of expression "; … … 457 463 case Tuple: 458 464 case Typeof: 465 case Basetypeof: 459 466 case Builtin: 460 467 assertf(false, "Tried to get leaf name from kind without a name: %d", kind); … … 535 542 return buildTuple( td ); 536 543 case TypeData::Typeof: 544 case TypeData::Basetypeof: 537 545 return buildTypeof( td ); 538 546 case TypeData::Builtin: … … 929 937 930 938 TypeofType * buildTypeof( const TypeData * td ) { 931 assert( td->kind == TypeData::Typeof );939 assert( td->kind == TypeData::Typeof || td->kind == TypeData::Basetypeof ); 932 940 assert( td->typeexpr ); 933 941 // assert( td->typeexpr->expr ); 934 return new TypeofType( buildQualifiers( td ), td->typeexpr->build() );942 return new TypeofType( td->kind == TypeData::Basetypeof ? Type::Qualifiers{} : buildQualifiers( td ), td->typeexpr->build() ); 935 943 } // buildTypeof 936 944
Note: See TracChangeset
for help on using the changeset viewer.