aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-08-06 21:21:21 +0000
committerJohn McCall <rjmccall@apple.com>2009-08-06 21:21:21 +0000
commit470c2a9ab6807be8a695e583a41b20ed69082260 (patch)
treec7eb2b6d747c4015b6bb7e0330ee2bc1f8b5e82e
parent301f7acce86e39320f072f002df5e5a9004e040a (diff)
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
guard its report on GNUMode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78338 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
-rw-r--r--lib/Sema/SemaDeclCXX.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 17bf188bf3..aac64cee65 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -299,7 +299,7 @@ def err_unexpected_friend : Error<
"friends can only be classes or functions">;
def err_friend_is_member : Error<
"friends cannot be members of the declaring class">;
-def extwarn_friend_inner_class : ExtWarn<
+def ext_friend_inner_class : Extension<
"C++ 98 does not allow inner classes as friends">;
def err_unelaborated_friend_type : Error<
"must specify '%select{class|union}0' in a friend "
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 63b0b3d83d..20862d4c81 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -3371,8 +3371,8 @@ Sema::DeclPtrTy Sema::ActOnFriendDecl(Scope *S,
// Also, definitions currently get treated in a way that causes
// this error, so only report it if we didn't see a definition.
else if (RD->getDeclContext() == CurContext &&
- !(getLangOptions().CPlusPlus0x || getLangOptions().GNUMode))
- Diag(DS.getFriendSpecLoc(), diag::extwarn_friend_inner_class);
+ !getLangOptions().CPlusPlus0x)
+ Diag(DS.getFriendSpecLoc(), diag::ext_friend_inner_class);
return DeclPtrTy::make(RD);
}