blob: 12ad32fa3d1847fd067a77e65734925c79c6d169 [file] [log] [blame]
Andy Gibbsb42f2002013-04-17 08:06:46 +00001// RUN: rm -rf %t
2// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map
Stephen Hines651f13c2014-04-23 16:59:28 -07003// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -w %s -verify
Douglas Gregor7dc80e12013-01-09 00:47:56 +00004
5// Test redeclarations of functions where the original declaration is
6// still hidden.
7
8@import linkage_merge_left; // excludes "sub"
9
Andy Gibbsb42f2002013-04-17 08:06:46 +000010extern int f0(float);
11// expected-error@-1{{conflicting types for 'f0'}}
12// expected-note@Inputs/linkage-merge-sub.h:1{{previous declaration}}
13
Douglas Gregor7dc80e12013-01-09 00:47:56 +000014static int f1(float); // okay: considered distinct
15static int f2(float); // okay: considered distinct
16extern int f3(float); // okay: considered distinct
17
Andy Gibbsb42f2002013-04-17 08:06:46 +000018extern float v0;
19// expected-error@-1{{redefinition of 'v0' with a different type: 'float' vs 'int'}}
20// expected-note@Inputs/linkage-merge-sub.h:6{{previous definition is here}}
21
Douglas Gregor7dc80e12013-01-09 00:47:56 +000022static float v1;
23static float v2;
24extern float v3;
25
26typedef float T0;