annotate clang/test/Modules/diamond-pch.c @ 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 // RUN: rm -rf %t
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-pch -fmodules-cache-path=%t -I %S/Inputs -o %t.pch %S/Inputs/diamond.h
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -I %S/Inputs -verify
anatofuz
parents:
diff changeset
8 // FIXME: When we have a syntax for modules in C, use that.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 void test_diamond(int i, float f, double d, char c) {
anatofuz
parents:
diff changeset
11 top(&i);
anatofuz
parents:
diff changeset
12 left(&f);
anatofuz
parents:
diff changeset
13 right(&d);
anatofuz
parents:
diff changeset
14 bottom(&c);
anatofuz
parents:
diff changeset
15 bottom(&d);
anatofuz
parents:
diff changeset
16 // expected-warning@-1{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
anatofuz
parents:
diff changeset
17 // expected-note@Inputs/diamond_bottom.h:4{{passing argument to parameter 'x' here}}
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 // Names in multiple places in the diamond.
anatofuz
parents:
diff changeset
20 top_left(&c);
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 left_and_right(&i);
anatofuz
parents:
diff changeset
23 struct left_and_right lr;
anatofuz
parents:
diff changeset
24 lr.left = 17;
anatofuz
parents:
diff changeset
25 }