2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2009-01-06 03:50:09 +08:00
|
|
|
extern "C" {
|
|
|
|
extern "C" void f(int);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C++" {
|
|
|
|
extern "C++" int& g(int);
|
|
|
|
float& g();
|
|
|
|
}
|
|
|
|
double& g(double);
|
|
|
|
|
|
|
|
void test(int x, double d) {
|
|
|
|
f(x);
|
|
|
|
float &f1 = g();
|
|
|
|
int& i1 = g(x);
|
|
|
|
double& d1 = g(d);
|
|
|
|
}
|
2009-01-07 10:48:43 +08:00
|
|
|
|
|
|
|
extern "C" int foo;
|
|
|
|
extern "C" int foo;
|
|
|
|
|
|
|
|
extern "C" const int bar;
|
|
|
|
extern "C" int const bar;
|
2009-05-17 06:05:23 +08:00
|
|
|
|
|
|
|
// <rdar://problem/6895431>
|
|
|
|
extern "C" struct bar d;
|
|
|
|
extern struct bar e;
|
2009-08-25 02:55:03 +08:00
|
|
|
|
|
|
|
extern "C++" {
|
|
|
|
namespace N0 {
|
|
|
|
struct X0 {
|
|
|
|
int foo(int x) { return x; }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|