linkage2.cpp revision e57e3d3783586934e26191cfc06ed5f3d966ea9c
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3namespace test1 {
4  int x; // expected-note {{previous definition is here}}
5  static int y; // expected-note {{previous definition is here}}
6  void f() {} // expected-note {{previous definition is here}}
7
8  extern "C" {
9    extern int x; // expected-error {{declaration of 'x' has a different language linkage}}
10    extern int y; // expected-error {{declaration of 'y' has a different language linkage}}
11    void f(); // expected-error {{declaration of 'f' has a different language linkage}}
12  }
13}
14