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