blob: 6d94975b4761ded2daf78bc17ef2a98c71a9fdc9 [file] [log] [blame]
Douglas Gregor7dc80e12013-01-09 00:47:56 +00001// In module: expected-note{{previous declaration}}
2
3
4
5
6// In module: expected-note{{previous definition is here}}
7
8// Test redeclarations of functions where the original declaration is
9// still hidden.
10
11@import linkage_merge_left; // excludes "sub"
12
13extern int f0(float); // expected-error{{conflicting types for 'f0'}}
14static int f1(float); // okay: considered distinct
15static int f2(float); // okay: considered distinct
16extern int f3(float); // okay: considered distinct
17
18extern float v0; // expected-error{{redefinition of 'v0' with a different type: 'float' vs 'int'}}
19static float v1;
20static float v2;
21extern float v3;
22
23typedef float T0;
24
25// RUN: rm -rf %t
26// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map
27// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -w %s -verify