1*67e74705SXin Li// RUN: rm -rf %t 2*67e74705SXin Li// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map 3*67e74705SXin Li// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -w %s -verify 4*67e74705SXin Li 5*67e74705SXin Li// Test redeclarations of functions where the original declaration is 6*67e74705SXin Li// still hidden. 7*67e74705SXin Li 8*67e74705SXin Li@import linkage_merge_left; // excludes "sub" 9*67e74705SXin Li 10*67e74705SXin Liextern int f0(float); 11*67e74705SXin Li// expected-error@-1{{conflicting types for 'f0'}} 12*67e74705SXin Li// expected-note@Inputs/linkage-merge-sub.h:1{{previous declaration}} 13*67e74705SXin Li 14*67e74705SXin Listatic int f1(float); // okay: considered distinct 15*67e74705SXin Listatic int f2(float); // okay: considered distinct 16*67e74705SXin Liextern int f3(float); // okay: considered distinct 17*67e74705SXin Li 18*67e74705SXin Liextern float v0; 19*67e74705SXin Li// expected-error@-1{{redeclaration of 'v0' with a different type: 'float' vs 'int'}} 20*67e74705SXin Li// expected-note@Inputs/linkage-merge-sub.h:6{{previous declaration is here}} 21*67e74705SXin Li 22*67e74705SXin Listatic float v1; 23*67e74705SXin Listatic float v2; 24*67e74705SXin Liextern float v3; 25*67e74705SXin Li 26*67e74705SXin Litypedef float T0; 27