Debian Codegraph @

clang/test/AST/ByteCode/objc.mm

raw
1 // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both %s
2 // RUN: %clang_cc1 -verify=ref,both %s
3
4 @interface A {
5 int a;
6 static_assert(a, ""); // both-error {{static assertion expression is not an integral constant expression}}
7 }
8 @end
9
10 @interface NSString
11 @end
12 constexpr NSString *t0 = @"abc";
13 constexpr NSString *t1 = @("abc");
14
15
16 #if __LP64__
17 typedef unsigned long NSUInteger;
18 typedef long NSInteger;
19 #else
20 typedef unsigned int NSUInteger;
21 typedef int NSInteger;
22 #endif
23
24
25 @class NSNumber;
26
27
28 @interface NSObject
29 + (NSObject*)nsobject;
30 @end
31
32 @interface NSNumber : NSObject
33 + (NSNumber *)numberWithInt:(int)value;
34 @end
35
36 int main(void) {
37 NSNumber *bv = @(1391126400 * 1000); // both-warning {{overflow in expression; result is -443'003'904 with type 'int'}}
38 }