]> granicus.if.org Git - clang/commitdiff
Add forgotten test case for linkage specifications
authorDouglas Gregor <dgregor@apple.com>
Mon, 5 Jan 2009 19:50:09 +0000 (19:50 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 5 Jan 2009 19:50:09 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61737 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/linkage-spec.cpp [new file with mode: 0644]

diff --git a/test/SemaCXX/linkage-spec.cpp b/test/SemaCXX/linkage-spec.cpp
new file mode 100644 (file)
index 0000000..80d95fb
--- /dev/null
@@ -0,0 +1,17 @@
+// RUN: clang -fsyntax-only -verify %s
+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);
+}