aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-06-15 15:56:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-06-15 15:56:08 +0000
commitcbeedfaf2d8779bfa9a91c0f923c60b8a12627f4 (patch)
treecef978314d007f412c049c705d1b41e3ed1850ce
parent0c3a16d5da555c6a78ece6cb6e8eab46aa0ed010 (diff)
Test for [basic.lookup.unqual]p3
- Failing, at least in part, because lookup in parser is finding a friend function where it shouldn't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73388 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp
new file mode 100644
index 0000000000..1daf0ddec6
--- /dev/null
+++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp
@@ -0,0 +1,26 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// XFAIL
+
+// FIXME: This part is here to demonstrate the failure in looking up 'f', it can
+// be removed once the whole test passes.
+typedef int f;
+namespace N0 {
+ struct A {
+ friend void f();
+ void g() {
+ int i = f(1);
+ }
+ };
+}
+
+namespace N1 {
+ struct A {
+ friend void f(A &);
+ operator int();
+ void g(A a) {
+ // ADL should not apply to the lookup of 'f', it refers to the typedef
+ // above.
+ int i = f(a);
+ }
+ };
+}