1//===-- main.m ------------------------------------------------*- ObjC -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9#import <Foundation/Foundation.h> 10 11int main (int argc, const char * argv[]) 12{ 13 14 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 15 16 NSSet* set = [NSSet setWithArray:@[@1,@"hello",@2,@"world"]]; 17 NSMutableSet* mutable = [NSMutableSet setWithCapacity:5]; 18 [mutable addObject:@1]; 19 [mutable addObject:@2]; 20 [mutable addObject:@3]; 21 [mutable addObject:@4]; 22 [mutable addObject:@5]; 23 [mutable addObject:[NSURL URLWithString:@"www.apple.com"]]; 24 [mutable addObject:@[@1,@2,@3]]; 25 [mutable unionSet:set]; 26 [mutable removeAllObjects]; // Set break point at this line. 27 [mutable unionSet:set]; 28 [mutable addObject:@1]; 29 30 [pool drain]; 31 return 0; 32} 33 34