Add support for calls to overloaded member functions. Things to note:
  - Overloading has to cope with having both static and non-static
    member functions in the overload set.
  - The call may or may not have an implicit object argument,
    depending on the syntax (x.f() vs. f()) and the context (static
    vs. non-static member function).
  - We now generate MemberExprs for implicit member access expression.
  - We now cope with mutable whenever we're building MemberExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61329 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index b620b70..f8923b4 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -431,7 +431,7 @@
   void AddMethodCandidate(CXXMethodDecl *Method,
                           Expr *Object, Expr **Args, unsigned NumArgs,
                           OverloadCandidateSet& CandidateSet,
-                          bool SuppressUserConversions = true);
+                          bool SuppressUserConversions = false);
   void AddConversionCandidate(CXXConversionDecl *Conversion,
                               Expr *From, QualType ToType,
                               OverloadCandidateSet& CandidateSet);
@@ -468,7 +468,11 @@
                                         Expr **Args, unsigned NumArgs,
                                         SourceLocation *CommaLocs, 
                                         SourceLocation RParenLoc);
-
+  ExprResult
+  BuildCallToMemberFunction(Scope *S, Expr *MemExpr,
+                            SourceLocation LParenLoc, Expr **Args, 
+                            unsigned NumArgs, SourceLocation *CommaLocs,
+                            SourceLocation RParenLoc);
   ExprResult 
   BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc,
                                Expr **Args, unsigned NumArgs,
@@ -696,6 +700,11 @@
                                               tok::TokenKind OpKind,
                                               SourceLocation MemberLoc,
                                               IdentifierInfo &Member);
+  bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, 
+                               FunctionDecl *FDecl,
+                               const FunctionTypeProto *Proto,
+                               Expr **Args, unsigned NumArgs,
+                               SourceLocation RParenLoc);
   
   /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
   /// This provides the location of the left/right parens and a list of comma