From dc3eb6abb0f5d4c97a2bc141231cd759b701ab8a Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 15 May 2012 17:43:16 +0000 Subject: [PATCH] Remove word 'block' from option and diagnostic I added in r156825. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156831 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticSemaKinds.td | 6 +++--- lib/Sema/SemaDecl.cpp | 2 +- test/SemaObjC/no-ivar-in-interface-block.m | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index cd2bd27812..b1b40446ea 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3023,9 +3023,9 @@ def err_redefinition_of_enumerator : Error<"redefinition of enumerator %0">; def err_duplicate_member : Error<"duplicate member %0">; def err_misplaced_ivar : Error< "ivars may not be placed in %select{categories|class extension}0">; -def warn_ivar_in_interface_block : Warning< - "declaration of ivar in the interface block is deprecated">, - InGroup>, DefaultIgnore; +def warn_ivars_in_interface : Warning< + "declaration of ivars in the interface is deprecated">, + InGroup>, DefaultIgnore; def ext_enum_value_not_int : Extension< "ISO C restricts enumerator values to range of 'int' (%0 is too " "%select{small|large}1)">; diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 7c87aa1e81..be1ab69a56 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -9543,7 +9543,7 @@ Decl *Sema::ActOnIvar(Scope *S, if (LangOpts.ObjCNonFragileABI2 && !NewID->isInvalidDecl() && isa(EnclosingDecl)) - Diag(Loc, diag::warn_ivar_in_interface_block); + Diag(Loc, diag::warn_ivars_in_interface); return NewID; } diff --git a/test/SemaObjC/no-ivar-in-interface-block.m b/test/SemaObjC/no-ivar-in-interface-block.m index ce98586306..897f7d863b 100644 --- a/test/SemaObjC/no-ivar-in-interface-block.m +++ b/test/SemaObjC/no-ivar-in-interface-block.m @@ -1,13 +1,13 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Winterface-block-ivar %s +// RUN: %clang_cc1 -fsyntax-only -verify -Winterface-ivars %s // rdar://10763173 @interface I { - @protected int P_IVAR; // expected-warning {{declaration of ivar in the interface block is deprecated}} + @protected int P_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} - @public int PU_IVAR; // expected-warning {{declaration of ivar in the interface block is deprecated}} + @public int PU_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} - @private int PRV_IVAR; // expected-warning {{declaration of ivar in the interface block is deprecated}} + @private int PRV_IVAR; // expected-warning {{declaration of ivars in the interface is deprecated}} } @end -- 2.50.1