brintos

brintos / llvm-project-archived public Read only

0
0
Text · 971 B · c38524f Raw
27 lines · plain
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.modulemap3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -w %s -verify4 5// Test redeclarations of functions where the original declaration is6// still hidden.7 8@import linkage_merge_left; // excludes "sub"9 10extern int f0(float);11// expected-error@-1{{conflicting types for 'f0'}}12// expected-note@Inputs/linkage-merge-sub.h:1{{previous declaration}}13 14static int f1(float); // okay: considered distinct15static int f2(float); // okay: considered distinct16extern int f3(float); // okay: considered distinct17 18extern float v0;19// expected-error@-1{{redeclaration of 'v0' with a different type: 'float' vs 'int'}}20// expected-note@Inputs/linkage-merge-sub.h:6{{previous declaration is here}}21 22static float v1;23static float v2;24extern float v3;25 26typedef float T0;27