This patch makes "&Cls::purevfn" not an odr use. This isn't what the standard
says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use.

Also fixes a bug that caused us to not mark the function referenced just
because we didn't want to mark it odr used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174242 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/address-of.cpp b/test/SemaCXX/address-of.cpp
index 69fcaff..677dc89 100644
--- a/test/SemaCXX/address-of.cpp
+++ b/test/SemaCXX/address-of.cpp
@@ -44,3 +44,11 @@
   int (PR11066::*ptr)(int) = & &PR11066::foo; // expected-error{{address expression must be an lvalue or a function designator}}
 }
 
+namespace test3 {
+  // emit no error
+  template<typename T> struct S {
+    virtual void f() = 0;
+  };
+  template<typename T> void S<T>::f() { T::error; }
+  void (S<int>::*p)() = &S<int>::f;
+}