Skip to content

Commit 45b7e01

Browse files
committedMar 13, 2019
The _Atomic types don't need ().
1 parent af6c3b7 commit 45b7e01

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Unreleased
22

33
* Building with the 10.14 SDK.
4-
* Fix parse error of _Atomic() types
4+
* Fix parse error of _Atomic types. (Thanks to Jacob Bandes-Storch (jtbandes)).
55
* Work around many other parsing errors from blank types:
66
* types like vector_float4 have a blank encoding. (Thank you iTerm2! Open source FTW.)
77
* Swift types have a blank encoding.

‎Source/CDType.m

+2-12
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,6 @@ - (NSString *)formattedString:(NSString *)previousName formatter:(CDTypeFormatte
458458
case 'O':
459459
case 'R':
460460
case 'V':
461-
if (_subtype == nil) {
462-
if (currentName == nil)
463-
result = [self formattedStringForSimpleType];
464-
else
465-
result = [NSString stringWithFormat:@"%@ %@", self.formattedStringForSimpleType, currentName];
466-
} else
467-
result = [NSString stringWithFormat:@"%@ %@",
468-
self.formattedStringForSimpleType, [_subtype formattedString:currentName formatter:typeFormatter level:level]];
469-
break;
470-
471461
case 'A':
472462
if (_subtype == nil) {
473463
if (currentName == nil)
@@ -476,7 +466,7 @@ - (NSString *)formattedString:(NSString *)previousName formatter:(CDTypeFormatte
476466
result = [NSString stringWithFormat:@"%@ %@", self.formattedStringForSimpleType, currentName];
477467
} else
478468
result = [NSString stringWithFormat:@"%@ %@",
479-
self.formattedStringForSimpleType, currentName];
469+
self.formattedStringForSimpleType, [_subtype formattedString:currentName formatter:typeFormatter level:level]];
480470
break;
481471

482472
default:
@@ -539,7 +529,7 @@ - (NSString *)formattedStringForSimpleType;
539529
case 'O': return @"bycopy";
540530
case 'R': return @"byref";
541531
case 'V': return @"oneway";
542-
case 'A': return [NSString stringWithFormat:@"_Atomic(%@)", _subtype.formattedStringForSimpleType];
532+
case 'A': return @"_Atomic";
543533
default:
544534
break;
545535
}

0 commit comments

Comments
 (0)
Please sign in to comment.