25 lines · cpp
1// Test with PCH2// RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s3// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s4// expected-no-diagnostics5 6// PR108477#ifndef HEADER8#define HEADER9struct NSSize {10 double width;11 double height;12};13typedef struct NSSize NSSize;14 15static inline NSSize NSMakeSize(double w, double h) {16 NSSize s = { w, h };17 return s;18}19#else20float test(float v1, float v2) {21 NSSize s = NSMakeSize(v1, v2);22 return s.width;23}24#endif25