xref: /llvm-project/clang/test/Parser/objcxx11-initialized-temps.mm (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2// expected-no-diagnostics
3
4struct CGPoint {
5  double x;
6  double y;
7};
8typedef struct CGPoint CGPoint;
9
10struct CGSize {
11  double width;
12  double height;
13};
14typedef struct CGSize CGSize;
15
16struct CGRect {
17  CGPoint origin;
18  CGSize size;
19};
20typedef struct CGRect CGRect;
21
22typedef CGRect NSRect;
23
24void 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
38