Argument-dependent lookup for friend declarations.  Add a new decl type,
FriendFunctionDecl, and create instances as appropriate.

The design of FriendFunctionDecl is still somewhat up in the air;  you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.

llvm-svn: 78653
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index 52a812d4b..ca9fc32 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -29,7 +29,7 @@
 
   DeclPtrTy FnD;
   if (D.getDeclSpec().isFriendSpecified())
-    FnD = Actions.ActOnFriendDecl(CurScope, &D);
+    FnD = Actions.ActOnFriendDecl(CurScope, &D, /*IsDefinition*/ true);
   else
     FnD = Actions.ActOnCXXMemberDeclarator(CurScope, AS, D, 0, 0);
 
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index 5084d8a..fd860a4 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -954,7 +954,7 @@
     ConsumeToken();
 
     if (DS.isFriendSpecified())
-      Actions.ActOnFriendDecl(CurScope, &DS);
+      Actions.ActOnFriendDecl(CurScope, &DS, /*IsDefinition*/ false);
     else
       Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
 
@@ -1060,7 +1060,8 @@
     DeclPtrTy ThisDecl;
     if (DS.isFriendSpecified()) {
       // TODO: handle initializers, bitfields, 'delete'
-      ThisDecl = Actions.ActOnFriendDecl(CurScope, &DeclaratorInfo);
+      ThisDecl = Actions.ActOnFriendDecl(CurScope, &DeclaratorInfo,
+                                         /*IsDefinition*/ false);
     } else
       ThisDecl = Actions.ActOnCXXMemberDeclarator(CurScope, AS,
                                                   DeclaratorInfo,