brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 7ee8453 Raw
21 lines · plain
1// RUN: rm -rf %t2 3// Build PCH using A, with adjacent private module APrivate, which winds up being implicitly referenced4// 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-module5 6// Use the PCH with no explicit way to resolve APrivate, still pick it up by automatic second-chance search for "A" with "Private" appended7// 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-module8 9// Check the fixit10// 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 %s11 12// expected-warning@Inputs/implicit-private-with-different-name/A.framework/Modules/module.private.modulemap:1{{expected canonical name for private module 'APrivate'}}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}}14// CHECK: fix-it:"{{.*}}module.private.modulemap":{1:18-1:26}:"A_Private"15 16#ifndef HEADER17#define HEADER18#import "A/aprivate.h"19const int *y = &APRIVATE;20#endif21