annotate clang/test/Modules/implicit-private-with-different-name.m @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +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
anatofuz
parents:
diff changeset
3 // Build PCH using A, with adjacent private module APrivate, which winds up being implicitly referenced
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs/implicit-private-with-different-name -emit-pch -o %t-A.pch %s -Wprivate-module
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // Use the PCH with no explicit way to resolve APrivate, still pick it up by automatic second-chance search for "A" with "Private" appended
anatofuz
parents:
diff changeset
7 // RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs/implicit-private-with-different-name -include-pch %t-A.pch %s -fsyntax-only -Wprivate-module
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 // Check the fixit
anatofuz
parents:
diff changeset
10 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs/implicit-private-with-different-name -include-pch %t-A.pch %s -fsyntax-only -fdiagnostics-parseable-fixits -Wprivate-module %s 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 // expected-warning@Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1{{expected canonical name for private module 'APrivate'}}
anatofuz
parents:
diff changeset
13 // expected-note@Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1{{rename 'APrivate' to ensure it can be found by name}}
anatofuz
parents:
diff changeset
14 // CHECK: fix-it:"{{.*}}module.private.modulemap":{1:18-1:26}:"A_Private"
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 #ifndef HEADER
anatofuz
parents:
diff changeset
17 #define HEADER
anatofuz
parents:
diff changeset
18 #import "A/aprivate.h"
anatofuz
parents:
diff changeset
19 const int *y = &APRIVATE;
anatofuz
parents:
diff changeset
20 #endif