brintos

brintos / llvm-project-archived public Read only

0
0
Text · 696 B · dd1225c Raw
33 lines · plain
1// RUN: clang-tidy -checks=-*,google-runtime-int %s 2>&1 -- | count 02// RUN: clang-tidy -checks=-*,google-runtime-int %s 2>&1 -- -x objective-c++ | count 03 4typedef long NSInteger;5typedef unsigned long NSUInteger;6 7@interface NSString8@property(readonly) NSInteger integerValue;9@property(readonly) long long longLongValue;10@property(readonly) NSUInteger length;11@end12 13NSInteger Foo(NSString *s) {14  return [s integerValue];15}16 17long long Bar(NSString *s) {18  return [s longLongValue];19}20 21NSUInteger Baz(NSString *s) {22  return [s length];23}24 25unsigned short NSSwapShort(unsigned short inv);26 27long DoSomeMath(long a, short b) {28  short c = NSSwapShort(b);29  long a2 = a * 5L;30  return a2 + c;31}32 33