Home | History | Annotate | Download | only in Modules
      1 // 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 
     13 extern int f0(float); // expected-error{{conflicting types for 'f0'}}
     14 static int f1(float); // okay: considered distinct
     15 static int f2(float); // okay: considered distinct
     16 extern int f3(float); // okay: considered distinct
     17 
     18 extern float v0; // expected-error{{redefinition of 'v0' with a different type: 'float' vs 'int'}}
     19 static float v1;
     20 static float v2;
     21 extern float v3;
     22 
     23 typedef float T0;
     24 
     25 // RUN: rm -rf %t
     26 // 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
     28