| 344 | } |
| 345 | |
| 346 | bool needAvoidNullPtr ( const TypeDeclPtr & type, bool allowDim ) { |
| 347 | if ( !type ) { |
| 348 | return false; |
| 349 | } |
| 350 | if ( !allowDim && type->dim.size() ) { |
| 351 | return false; |
| 352 | } |
| 353 | if ( auto * ann = (TypeAnnotation *) type->isPointerToAnnotation() ) { |
| 354 | if ( ann->avoidNullPtr() ) { |
| 355 | return true; |
| 356 | } |
| 357 | } |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | struct PathToLoop { |
| 362 | const Variable * var = nullptr; |
no test coverage detected