| 94 | } |
| 95 | |
| 96 | TypeDeclPtr BasicStructureAnnotation::makeFieldType ( const string & na, bool isConst ) const { |
| 97 | auto it = fields.find(na); |
| 98 | if ( it!=fields.end() ) { |
| 99 | auto & sfield = it->second; |
| 100 | auto t = isConst && sfield.constDecl ? new TypeDecl(*sfield.constDecl) : new TypeDecl(*sfield.decl); |
| 101 | if ( sfield.offset != -1U ) { |
| 102 | t->ref = true; |
| 103 | } |
| 104 | return t; |
| 105 | } else { |
| 106 | return nullptr; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | TypeDeclPtr BasicStructureAnnotation::makeSafeFieldType ( const string & na, bool isConst ) const { |
| 111 | auto it = fields.find(na); |
no test coverage detected