Debian Codegraph @

clang/test/Parser/objcxx11-initialized-temps.mm

raw
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2 // expected-no-diagnostics
3
4 struct CGPoint {
5 double x;
6 double y;
7 };
8 typedef struct CGPoint CGPoint;
9
10 struct CGSize {
11 double width;
12 double height;
13 };
14 typedef struct CGSize CGSize;
15
16 struct CGRect {
17 CGPoint origin;
18 CGSize size;
19 };
20 typedef struct CGRect CGRect;
21
22 typedef CGRect NSRect;
23
24 void HappySetFrame(NSRect frame) {}
25
26 __attribute__((objc_root_class))
27 @interface NSObject @end
28
29 @implementation NSObject
30 - (void) sadSetFrame: (NSRect)frame {}
31
32 - (void) nothing
33 {
34 HappySetFrame({{0,0}, {13,14}});
35 [self sadSetFrame: {{0,0}, {13,14}}];
36 }
37 @end