]> granicus.if.org Git - clang/commitdiff
Add a module testcase with a using declaration.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 5 Apr 2013 00:52:14 +0000 (00:52 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 5 Apr 2013 00:52:14 +0000 (00:52 +0000)
Thanks a lot to Richard Smith for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178825 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/Inputs/linkage-merge-bar.h
test/Modules/Inputs/linkage-merge-foo.h
test/Modules/linkage-merge.cpp

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..cc528f77522b2d3eaecea570f4051e2991380f42 100644 (file)
@@ -0,0 +1,3 @@
+#include <linkage-merge-foo.h>
+
+using ::g;
index 7ed777512290417bcbd91b14c2c91f6a3f58da0e..9cb62d2c0cb4c8450f634ca4304fcc6c82814e4d 100644 (file)
@@ -1 +1,2 @@
 int f();
+static int g(int);
index dafb0090e7d478c88d44a57f1dd7c4ff058213e6..4e2ecef7d973982296da0c210000095c94c0b721 100644 (file)
@@ -1,7 +1,13 @@
-// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s
+// FIXME: we should be able to put these in the .h file :-(
+// expected-note {{target of using declaration}}
+// expected-note {{using declaration}}
 
 #include "linkage-merge-bar.h"
 
 static int f(int);
 int f(int);
+
+static void g(int); // expected-error {{declaration conflicts with target of using declaration already in scope}}
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -verify -fmodules -fmodules-cache-path=%t -I %S/Inputs %s