FoundationClass Class = findKnownClass(ClassID);
if (Class != FC_NSDictionary &&
Class != FC_NSArray &&
- Class != FC_NSSet)
+ Class != FC_NSSet &&
+ Class != FC_NSOrderedSet)
return;
SymbolRef ContainerS = M.getReceiverSVal().getAsSymbol();
@end
+@interface NSOrderedSet : NSObject <NSFastEnumeration>
+@end
+@interface NSOrderedSet (NSOrderedSetCreation)
+- (NSUInteger)count;
+@end
+
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
@end
}
}
+void testCountAwareNSOrderedSet(NSOrderedSet *containers, int *validptr) {
+ int *x = 0;
+ NSUInteger containerCount = [containers count];
+ if (containerCount > 0)
+ x = validptr;
+ for (id c in containers) {
+ *x = 1; // no warning
+ }
+}