brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 95c30bf Raw
37 lines · cpp
1 2#define import @import3import lookup_left_cxx;4#undef import5#define IMPORT(X) @import X6IMPORT(lookup_right_cxx);7 8// expected-warning@Inputs/lookup_left.hpp:3 {{weak identifier 'weak_identifier' never declared}}9 10void test(int i, float f) {11  // unqualified lookup12  f0(&i);13  f0(&f);14 15  // qualified lookup into the translation unit16  ::f0(&i);17  ::f0(&f);18}19 20int import;21 22void f() {23 int import;24}25 26// RUN: rm -rf %t27// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.modulemap -verify28// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.modulemap -verify29// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify30// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s31// FIXME: When we have a syntax for modules in C++, use that.32 33// CHECK-PRINT: int *f0(int *);34// CHECK-PRINT: float *f0(float *);35// CHECK-PRINT: void test(int i, float f)36 37