@@ -410,33 +410,6 @@ namespace {
410
410
return Type ();
411
411
}
412
412
413
- ImportResult VisitCountAttributedType (
414
- const clang::CountAttributedType *type) {
415
- // CountAttributedType is a clang type representing a pointer with
416
- // a "counted_by" type attribute. For now, we don't import these
417
- // into Swift.
418
- // In the future we could do something more clever (such as trying to
419
- // import as an Array where possible) or less clever (such as importing
420
- // as the desugared, underlying pointer type).
421
- return Type ();
422
- }
423
-
424
- ImportResult VisitDynamicRangePointerType (
425
- const clang::DynamicRangePointerType *type) {
426
- // DynamicRangePointerType is a clang type representing a pointer with
427
- // an "ended_by" type attribute for -fbounds-safety. For now, we don't
428
- // import these into Swift.
429
- return Type ();
430
- }
431
-
432
- ImportResult VisitValueTerminatedType (
433
- const clang::ValueTerminatedType *type) {
434
- // ValueTerminatedType is a clang type representing a pointer with
435
- // a "terminated_by" type attribute for -fbounds-safety. For now, we don't
436
- // import these into Swift.
437
- return Type ();
438
- }
439
-
440
413
ImportResult VisitMemberPointerType (const clang::MemberPointerType *type) {
441
414
return Type ();
442
415
}
@@ -957,6 +930,12 @@ namespace {
957
930
SUGAR_TYPE (Using)
958
931
SUGAR_TYPE (BTFTagAttributed)
959
932
933
+ // Clang types representing a pointer with a bounds annotation such as
934
+ // "counted_by", "ended_by" and "terminated_by". For now, we ignore them.
935
+ SUGAR_TYPE (CountAttributed)
936
+ SUGAR_TYPE (DynamicRangePointer)
937
+ SUGAR_TYPE (ValueTerminated)
938
+
960
939
ImportResult VisitDecayedType (const clang::DecayedType *type) {
961
940
clang::ASTContext &clangCtx = Impl.getClangASTContext ();
962
941
if (clangCtx.hasSameType (type->getOriginalType (),
0 commit comments