annotate clang/test/PCH/cxx-implicit-moves.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Test with PCH
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -std=c++11 -x c++-header -emit-pch -o %t %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
anatofuz
parents:
diff changeset
4 // expected-no-diagnostics
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // PR10847
anatofuz
parents:
diff changeset
7 #ifndef HEADER
anatofuz
parents:
diff changeset
8 #define HEADER
anatofuz
parents:
diff changeset
9 struct NSSize {
anatofuz
parents:
diff changeset
10 double width;
anatofuz
parents:
diff changeset
11 double height;
anatofuz
parents:
diff changeset
12 };
anatofuz
parents:
diff changeset
13 typedef struct NSSize NSSize;
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 static inline NSSize NSMakeSize(double w, double h) {
anatofuz
parents:
diff changeset
16 NSSize s = { w, h };
anatofuz
parents:
diff changeset
17 return s;
anatofuz
parents:
diff changeset
18 }
anatofuz
parents:
diff changeset
19 #else
anatofuz
parents:
diff changeset
20 float test(float v1, float v2) {
anatofuz
parents:
diff changeset
21 NSSize s = NSMakeSize(v1, v2);
anatofuz
parents:
diff changeset
22 return s.width;
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24 #endif