Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function.  Diagnose this in the general case.  Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.

llvm-svn: 130239
diff --git a/clang/test/SemaCXX/expression-traits.cpp b/clang/test/SemaCXX/expression-traits.cpp
index 6b644ea..4555192 100644
--- a/clang/test/SemaCXX/expression-traits.cpp
+++ b/clang/test/SemaCXX/expression-traits.cpp
@@ -189,12 +189,12 @@
     static int& NestedFuncTemplate() { return variable; } // expected-note{{candidate function}}
 
     template <class T>
-    int& NestedMemfunTemplate() { return variable; } // expected-note{{candidate function}}
+    int& NestedMemfunTemplate() { return variable; }
 
     int operator*() const;
 
     template <class T>
-    int operator+(T) const; // expected-note{{candidate function}}
+    int operator+(T) const;
 
     int NonstaticMemberFunction();
     static int StaticMemberFunction();
@@ -237,12 +237,12 @@
         // expected-error{{cannot resolve overloaded function 'NestedFuncTemplate' from context}}
         
         __is_lvalue_expr(::Class::NestedMemfunTemplate);  // qualified-id: template \
-        // expected-error{{cannot resolve overloaded function 'NestedMemfunTemplate' from context}}
+        // expected-error{{a bound member function may only be called}}
         
         __is_lvalue_expr(::Class::operator+);             // operator-function-id: template \
-        // expected-error{{cannot resolve overloaded function 'operator+' from context}}
+        // expected-error{{a bound member function may only be called}}
 
-        ASSERT_RVALUE(::Class::operator*);         // operator-function-id: member function
+        //ASSERT_RVALUE(::Class::operator*);         // operator-function-id: member function
     }
 
     void expr_prim_7()
@@ -256,7 +256,7 @@
         ASSERT_LVALUE(StaticMemberFunction);        // identifier: function
         ASSERT_LVALUE(variable);        // identifier: variable
         ASSERT_LVALUE(dataMember);      // identifier: data member
-        ASSERT_RVALUE(NonstaticMemberFunction); // identifier: member function
+        //ASSERT_RVALUE(NonstaticMemberFunction); // identifier: member function
 
         // (cont'd)...A nested-name-specifier that names a class,
         // optionally followed by the keyword template (14.2), and then
@@ -267,11 +267,11 @@
         // member function or a data member.
         ASSERT_LVALUE(Class::dataMember);
         ASSERT_LVALUE(Class::StaticMemberFunction);
-        ASSERT_RVALUE(Class::NonstaticMemberFunction); // identifier: member function
+        //ASSERT_RVALUE(Class::NonstaticMemberFunction); // identifier: member function
 
         ASSERT_LVALUE(Class::baseDataMember);
         ASSERT_LVALUE(Class::BaseStaticMemberFunction);
-        ASSERT_RVALUE(Class::BaseNonstaticMemberFunction); // identifier: member function
+        //ASSERT_RVALUE(Class::BaseNonstaticMemberFunction); // identifier: member function
     }
 };
 
@@ -371,7 +371,7 @@
     
     // — Otherwise, if E1.E2 refers to a non-static member function,
     // then E1.E2 is not an lvalue.
-    ASSERT_RVALUE(Class().NonstaticMemberFunction);
+    //ASSERT_RVALUE(Class().NonstaticMemberFunction);
 
     // — If E2 is a member enumerator, and the type of E2 is T, the
     // expression E1.E2 is not an lvalue. The type of E1.E2 is T.
@@ -502,17 +502,17 @@
     // is a pointer to data member... (cont'd)
     typedef Class MakeRValue;
     ASSERT_RVALUE(MakeRValue().*(&Class::dataMember));
-    ASSERT_RVALUE(MakeRValue().*(&Class::NonstaticMemberFunction));
+    //ASSERT_RVALUE(MakeRValue().*(&Class::NonstaticMemberFunction));
     Class lvalue;
     ASSERT_LVALUE(lvalue.*(&Class::dataMember));
-    ASSERT_RVALUE(lvalue.*(&Class::NonstaticMemberFunction));
+    //ASSERT_RVALUE(lvalue.*(&Class::NonstaticMemberFunction));
     
     // (cont'd)...The result of an ->* expression is an lvalue only
     // if its second operand is a pointer to data member. If the
     // second operand is the null pointer to member value (4.11), the
     // behavior is undefined.
     ASSERT_LVALUE((&lvalue)->*(&Class::dataMember));
-    ASSERT_RVALUE((&lvalue)->*(&Class::NonstaticMemberFunction));
+    //ASSERT_RVALUE((&lvalue)->*(&Class::NonstaticMemberFunction));
 }
 
 void expr_cond(bool cond)