r177490 - Remove some dead code.

John McCall rjmccall at apple.com
Tue Mar 19 23:22:14 PDT 2013


Author: rjmccall
Date: Wed Mar 20 01:22:14 2013
New Revision: 177490

URL: http://llvm.org/viewvc/llvm-project?rev=177490&view=rev
Log:
Remove some dead code.

Patch by Stephen Lin!

Modified:
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=177490&r1=177489&r2=177490&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Mar 20 01:22:14 2013
@@ -10822,17 +10822,6 @@ NamedDecl *Sema::ActOnFriendFunctionDecl
       DC = DC->getParent();
     }
 
-    // C++ [class.friend]p1: A friend of a class is a function or
-    //   class that is not a member of the class . . .
-    // C++11 changes this for both friend types and functions.
-    // Most C++ 98 compilers do seem to give an error here, so
-    // we do, too.
-    if (!Previous.empty() && DC->Equals(CurContext))
-      Diag(DS.getFriendSpecLoc(),
-           getLangOpts().CPlusPlus11 ?
-             diag::warn_cxx98_compat_friend_is_member :
-             diag::err_friend_is_member);
-
     DCScope = getScopeForDeclContext(S, DC);
     
     // C++ [class.friend]p6:





More information about the cfe-commits mailing list