xref: /minix3/external/bsd/llvm/dist/clang/test/PCH/cxx-implicit-moves.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
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 Sambuc static 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 Sambuc float 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