blob: 16e220507831d3ad2039afade1ef4194592f8790 [file] [log] [blame]
Douglas Gregor3552dab2013-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
Douglas Gregor35b04d62013-02-07 19:01:24 +000026// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map
27// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w %s -verify