diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 17bf188bf37..aac64cee65b 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 63b0b3d83d7..20862d4c81f 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/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); } |