[cfe-commits] r73388 - in /cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual: ./ p3.cpp

Daniel Dunbar daniel at zuster.org
Mon Jun 15 08:56:08 PDT 2009


Author: ddunbar
Date: Mon Jun 15 10:56:08 2009
New Revision: 73388

URL: http://llvm.org/viewvc/llvm-project?rev=73388&view=rev
Log:
Test for [basic.lookup.unqual]p3
 - Failing, at least in part, because lookup in parser is finding a friend
   function where it shouldn't.

Added:
    cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp
Modified:
    cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/   (props changed)

Propchange: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/

------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Jun 15 10:56:08 2009
@@ -0,0 +1 @@
+Output

Added: cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp?rev=73388&view=auto

==============================================================================
--- cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp (added)
+++ cfe/trunk/test/CXX/basic/basic.lookup/basic.lookup.unqual/p3.cpp Mon Jun 15 10:56:08 2009
@@ -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);
+    }
+  };
+}





More information about the cfe-commits mailing list