[cfe-commits] r73956 - /cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp

Douglas Gregor dgregor at apple.com
Tue Jun 23 08:45:34 PDT 2009


Author: dgregor
Date: Tue Jun 23 10:45:29 2009
New Revision: 73956

URL: http://llvm.org/viewvc/llvm-project?rev=73956&view=rev
Log:
Add a test illustrating our current inability to properly cope with the point of instantation of a member function of a class template specialization

Added:
    cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp   (with props)

Added: cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp?rev=73956&view=auto

==============================================================================
--- cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp (added)
+++ cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp Tue Jun 23 10:45:29 2009
@@ -0,0 +1,32 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+// XFAIL
+
+// Note: we fail this test because we perform template instantiation
+// at the end of the translation unit, so argument-dependent lookup
+// finds functions that occur after the point of instantiation. Note
+// that GCC fails this test; EDG passes the test in strict mode, but
+// not in relaxed mode.
+namespace N {
+  struct A { };
+  struct B : public A { };
+
+  int& f0(A&);
+}
+
+template<typename T, typename Result>
+struct X0 {
+  void test_f0(T t) {
+    Result r = f0(t);
+  };
+};
+
+void test_f0() {
+  X0<N::A, int&> xA;
+  xA.test_f0(N::A());
+  X0<N::B, int&> xB;
+  xB.test_f0(N::B());
+}
+
+namespace N {
+  char& f0(B&);
+}

Propchange: cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp

------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp

------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cfe/trunk/test/CXX/temp/temp.res/temp.dep.res/temp.point/p1.cpp

------------------------------------------------------------------------------
    svn:mime-type = text/plain





More information about the cfe-commits mailing list