1*f4a2713aSLionel Sambuc // Test with PCH 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s 3*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s 4*f4a2713aSLionel Sambuc // expected-no-diagnostics 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc // PR10847 7*f4a2713aSLionel Sambuc #ifndef HEADER 8*f4a2713aSLionel Sambuc #define HEADER 9*f4a2713aSLionel Sambuc struct NSSize { 10*f4a2713aSLionel Sambuc double width; 11*f4a2713aSLionel Sambuc double height; 12*f4a2713aSLionel Sambuc }; 13*f4a2713aSLionel Sambuc typedef struct NSSize NSSize; 14*f4a2713aSLionel Sambuc NSMakeSize(double w,double h)15*f4a2713aSLionel Sambucstatic inline NSSize NSMakeSize(double w, double h) { 16*f4a2713aSLionel Sambuc NSSize s = { w, h }; 17*f4a2713aSLionel Sambuc return s; 18*f4a2713aSLionel Sambuc } 19*f4a2713aSLionel Sambuc #else test(float v1,float v2)20*f4a2713aSLionel Sambucfloat test(float v1, float v2) { 21*f4a2713aSLionel Sambuc NSSize s = NSMakeSize(v1, v2); 22*f4a2713aSLionel Sambuc return s.width; 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc #endif 25