blob: ccdc874cb1fa8aa48ed6bea7f5d45d13f3f3e1e0 [file] [log] [blame]
Douglas Gregor58e97972011-09-06 16:38:46 +00001// Test with PCH
Richard Smith762bb9d2011-10-13 22:29:44 +00002// RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s
3// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
Douglas Gregor58e97972011-09-06 16:38:46 +00004
5// PR10847
6#ifndef HEADER
7#define HEADER
8struct NSSize {
9 double width;
10 double height;
11};
12typedef struct NSSize NSSize;
13
14static inline NSSize NSMakeSize(double w, double h) {
15 NSSize s = { w, h };
16 return s;
17}
18#else
19float test(float v1, float v2) {
20 NSSize s = NSMakeSize(v1, v2);
21 return s.width;
22}
23#endif