r197627 - Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'.
Aaron Ballman
aaron at aaronballman.com
Thu Dec 19 13:57:03 PST 2013
On Wed, Dec 18, 2013 at 6:30 PM, Ted Kremenek <kremenek at apple.com> wrote:
> Author: kremenek
> Date: Wed Dec 18 17:30:06 2013
> New Revision: 197627
>
> URL: http://llvm.org/viewvc/llvm-project?rev=197627&view=rev
> Log:
> Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'.
>
> Fixes <rdar://problem/15584219> and <rdar://problem/12241361>.
>
> This change looks large, but all it does is reuse and consolidate
> the delayed diagnostic logic for deprecation warnings with unavailability
> warnings. By doing so, it showed various inconsistencies between the
> diagnostics, which were close, but not consistent. It also revealed
> some missing "note:"'s in the deprecated diagnostics that were showing
> up in the unavailable diagnostics, etc.
>
> This change also changes the wording of the core deprecation diagnostics.
> Instead of saying "function has been explicitly marked deprecated"
> we now saw "'X' has been been explicitly marked deprecated". It
> turns out providing a bit more context is useful, and often we
> got the actual term wrong or it was not very precise
> (e.g., "function" instead of "destructor"). By just saying the name
> of the thing that is deprecated/deleted/unavailable we define
> this issue away. This diagnostic can likely be further wordsmithed
> to be shorter.
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> cfe/trunk/include/clang/Sema/DelayedDiagnostic.h
> cfe/trunk/include/clang/Sema/Sema.h
> cfe/trunk/lib/Sema/DelayedDiagnostic.cpp
> cfe/trunk/lib/Sema/SemaDeclAttr.cpp
> cfe/trunk/lib/Sema/SemaExpr.cpp
> cfe/trunk/test/ARCMT/checking.m
> cfe/trunk/test/Analysis/retain-release.m
> cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
> cfe/trunk/test/CXX/special/class.copy/p33-0x.cpp
> cfe/trunk/test/CXX/special/class.inhctor/p4.cpp
> cfe/trunk/test/CXX/special/class.temporary/p1.cpp
> cfe/trunk/test/Headers/ms-intrin.cpp
> cfe/trunk/test/Parser/MicrosoftExtensions.c
> cfe/trunk/test/Sema/MicrosoftExtensions.c
> cfe/trunk/test/Sema/attr-availability-ios.c
> cfe/trunk/test/Sema/attr-availability-macosx.c
> cfe/trunk/test/Sema/attr-availability.c
> cfe/trunk/test/Sema/attr-cleanup.c
> cfe/trunk/test/Sema/attr-deprecated-message.c
> cfe/trunk/test/Sema/attr-deprecated.c
> cfe/trunk/test/Sema/attr-unavailable-message.c
> cfe/trunk/test/Sema/typeof-use-deprecated.c
> cfe/trunk/test/SemaCXX/aggregate-initialization.cpp
> cfe/trunk/test/SemaCXX/attr-deprecated.cpp
> cfe/trunk/test/SemaCXX/attr-unavailable.cpp
> cfe/trunk/test/SemaCXX/cxx0x-delegating-ctors.cpp
> cfe/trunk/test/SemaCXX/deleted-function.cpp
> cfe/trunk/test/SemaCXX/for-range-dereference.cpp
> cfe/trunk/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp
> cfe/trunk/test/SemaCXX/rval-references-examples.cpp
> cfe/trunk/test/SemaObjC/arc-unavailable-system-function.m
> cfe/trunk/test/SemaObjC/attr-availability.m
> cfe/trunk/test/SemaObjC/attr-deprecated.m
> cfe/trunk/test/SemaObjC/class-unavail-warning.m
> cfe/trunk/test/SemaObjC/property-deprecated-warning.m
> cfe/trunk/test/SemaObjC/property-noninherited-availability-attr.m
> cfe/trunk/test/SemaObjC/protocol-attribute.m
> cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m
> cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m
> cfe/trunk/test/SemaObjC/warn-forward-class-attr-deprecated.m
> cfe/trunk/test/SemaObjC/warn-protocol-method-deprecated.m
> cfe/trunk/test/SemaObjCXX/arc-system-header.mm
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Dec 18 17:30:06 2013
> @@ -3527,8 +3527,8 @@ def err_unavailable : Error<"%0 is unava
> def err_unavailable_message : Error<"%0 is unavailable: %1">;
> def warn_unavailable_fwdclass_message : Warning<
> "%0 maybe unavailable because receiver type is unknown">;
> -def note_unavailable_here : Note<
> - "%select{declaration|function}0 has been explicitly marked "
> +def note_availability_specified_here : Note<
> + "%0 has been explicitly marked "
> "%select{unavailable|deleted|deprecated}1 here">;
> def note_implicitly_deleted : Note<
> "explicitly defaulted function was implicitly deleted here">;
>
> Modified: cfe/trunk/include/clang/Sema/DelayedDiagnostic.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DelayedDiagnostic.h?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Sema/DelayedDiagnostic.h (original)
> +++ cfe/trunk/include/clang/Sema/DelayedDiagnostic.h Wed Dec 18 17:30:06 2013
> @@ -113,7 +113,7 @@ private:
> /// the complete parsing of the current declaration.
> class DelayedDiagnostic {
> public:
> - enum DDKind { Deprecation, Access, ForbiddenType };
> + enum DDKind { Deprecation, Unavailable, Access, ForbiddenType };
>
> unsigned char Kind; // actually a DDKind
> bool Triggered;
> @@ -122,11 +122,13 @@ public:
>
> void Destroy();
>
> - static DelayedDiagnostic makeDeprecation(SourceLocation Loc,
> - const NamedDecl *D,
> - const ObjCInterfaceDecl *UnknownObjCClass,
> - const ObjCPropertyDecl *ObjCProperty,
> - StringRef Msg);
> + static DelayedDiagnostic makeAvailability(Sema::AvailabilityDiagnostic AD,
> + SourceLocation Loc,
> + const NamedDecl *D,
> + const ObjCInterfaceDecl *UnknownObjCClass,
> + const ObjCPropertyDecl *ObjCProperty,
> + StringRef Msg);
> +
>
> static DelayedDiagnostic makeAccess(SourceLocation Loc,
> const AccessedEntity &Entity) {
> @@ -162,12 +164,14 @@ public:
> }
>
> const NamedDecl *getDeprecationDecl() const {
> - assert(Kind == Deprecation && "Not a deprecation diagnostic.");
> + assert((Kind == Deprecation || Kind == Unavailable) &&
> + "Not a deprecation diagnostic.");
> return DeprecationData.Decl;
> }
>
> StringRef getDeprecationMessage() const {
> - assert(Kind == Deprecation && "Not a deprecation diagnostic.");
> + assert((Kind == Deprecation || Kind == Unavailable) &&
> + "Not a deprecation diagnostic.");
> return StringRef(DeprecationData.Message,
> DeprecationData.MessageLen);
> }
>
> Modified: cfe/trunk/include/clang/Sema/Sema.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Sema/Sema.h (original)
> +++ cfe/trunk/include/clang/Sema/Sema.h Wed Dec 18 17:30:06 2013
> @@ -3083,12 +3083,15 @@ public:
>
> void redelayDiagnostics(sema::DelayedDiagnosticPool &pool);
>
> - void EmitDeprecationWarning(NamedDecl *D, StringRef Message,
> - SourceLocation Loc,
> - const ObjCInterfaceDecl *UnknownObjCClass,
> - const ObjCPropertyDecl *ObjCProperty);
> + enum AvailabilityDiagnostic { AD_Deprecation, AD_Unavailable };
>
> - void HandleDelayedDeprecationCheck(sema::DelayedDiagnostic &DD, Decl *Ctx);
> + void EmitAvailabilityWarning(AvailabilityDiagnostic AD,
> + NamedDecl *D, StringRef Message,
> + SourceLocation Loc,
> + const ObjCInterfaceDecl *UnknownObjCClass,
> + const ObjCPropertyDecl *ObjCProperty);
> +
> + void HandleDelayedAvailabilityCheck(sema::DelayedDiagnostic &DD, Decl *Ctx);
>
> bool makeUnavailableInSystemHeader(SourceLocation loc,
> StringRef message);
>
> Modified: cfe/trunk/lib/Sema/DelayedDiagnostic.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DelayedDiagnostic.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/DelayedDiagnostic.cpp (original)
> +++ cfe/trunk/lib/Sema/DelayedDiagnostic.cpp Wed Dec 18 17:30:06 2013
> @@ -19,13 +19,22 @@
> using namespace clang;
> using namespace sema;
>
> -DelayedDiagnostic DelayedDiagnostic::makeDeprecation(SourceLocation Loc,
> +DelayedDiagnostic
> +DelayedDiagnostic::makeAvailability(Sema::AvailabilityDiagnostic AD,
> + SourceLocation Loc,
> const NamedDecl *D,
> const ObjCInterfaceDecl *UnknownObjCClass,
> const ObjCPropertyDecl *ObjCProperty,
> StringRef Msg) {
> DelayedDiagnostic DD;
> - DD.Kind = Deprecation;
> + switch (AD) {
> + case Sema::AD_Deprecation:
> + DD.Kind = Deprecation;
> + break;
> + case Sema::AD_Unavailable:
> + DD.Kind = Unavailable;
> + break;
> + }
> DD.Triggered = false;
> DD.Loc = Loc;
> DD.DeprecationData.Decl = D;
>
> Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Dec 18 17:30:06 2013
> @@ -4477,9 +4477,11 @@ void Sema::PopParsingDeclaration(Parsing
>
> switch (diag.Kind) {
> case DelayedDiagnostic::Deprecation:
> - // Don't bother giving deprecation diagnostics if the decl is invalid.
> + case DelayedDiagnostic::Unavailable:
> + // Don't bother giving deprecation/unavailable diagnostics if
> + // the decl is invalid.
> if (!decl->isInvalidDecl())
> - HandleDelayedDeprecationCheck(diag, decl);
> + HandleDelayedAvailabilityCheck(diag, decl);
> break;
>
> case DelayedDiagnostic::Access:
> @@ -4514,61 +4516,124 @@ static bool isDeclDeprecated(Decl *D) {
> return false;
> }
>
> +static bool isDeclUnavailable(Decl *D) {
> + do {
> + if (D->isUnavailable())
> + return true;
> + // A category implicitly has the availability of the interface.
> + if (const ObjCCategoryDecl *CatD = dyn_cast<ObjCCategoryDecl>(D))
> + return CatD->getClassInterface()->isUnavailable();
> + } while ((D = cast_or_null<Decl>(D->getDeclContext())));
> + return false;
> +}
> +
> static void
> -DoEmitDeprecationWarning(Sema &S, const NamedDecl *D, StringRef Message,
> - SourceLocation Loc,
> - const ObjCInterfaceDecl *UnknownObjCClass,
> - const ObjCPropertyDecl *ObjCPropery) {
> +DoEmitAvailabilityWarning(Sema &S,
> + DelayedDiagnostic::DDKind K,
> + Decl *Ctx,
> + const NamedDecl *D,
> + StringRef Message,
> + SourceLocation Loc,
> + const ObjCInterfaceDecl *UnknownObjCClass,
> + const ObjCPropertyDecl *ObjCProperty) {
> +
> + // Diagnostics for deprecated or unavailable.
> + unsigned diag, diag_message, diag_fwdclass_message;
> +
> + // Matches 'diag::note_property_attribute' options.
> + unsigned property_note_select;
> +
> + // Matches diag::note_availability_specified_here.
> + unsigned available_here_select_kind;
> +
> + // Don't warn if our current context is deprecated or unavailable.
> + switch (K) {
> + case DelayedDiagnostic::Deprecation:
> + if (isDeclDeprecated(Ctx))
> + return;
> + diag = diag::warn_deprecated;
> + diag_message = diag::warn_deprecated_message;
> + diag_fwdclass_message = diag::warn_deprecated_fwdclass_message;
> + property_note_select = /* deprecated */ 0;
> + available_here_select_kind = /* deprecated */ 2;
> + break;
> +
> + case DelayedDiagnostic::Unavailable:
> + if (isDeclUnavailable(Ctx))
> + return;
> + diag = diag::err_unavailable;
> + diag_message = diag::err_unavailable_message;
> + diag_fwdclass_message = diag::warn_unavailable_fwdclass_message;
> + property_note_select = /* unavailable */ 1;
> + available_here_select_kind = /* unavailable */ 0;
> + break;
> +
> + default:
> + llvm_unreachable("Neither a deprecation or unavailable kind");
> + }
> +
> DeclarationName Name = D->getDeclName();
> if (!Message.empty()) {
> - S.Diag(Loc, diag::warn_deprecated_message) << Name << Message;
> - S.Diag(D->getLocation(),
> - isa<ObjCMethodDecl>(D) ? diag::note_method_declared_at
> - : diag::note_previous_decl) << Name;
> - if (ObjCPropery)
> - S.Diag(ObjCPropery->getLocation(), diag::note_property_attribute)
> - << ObjCPropery->getDeclName() << 0;
> + S.Diag(Loc, diag_message) << Name << Message;
> +// S.Diag(D->getLocation(), diag::note_availability_specified_here)
> +// << D << available_here_select_kind;
Why is this commented out?
> + if (ObjCProperty)
> + S.Diag(ObjCProperty->getLocation(), diag::note_property_attribute)
> + << ObjCProperty->getDeclName() << property_note_select;
> } else if (!UnknownObjCClass) {
> - S.Diag(Loc, diag::warn_deprecated) << D->getDeclName();
> - S.Diag(D->getLocation(),
> - isa<ObjCMethodDecl>(D) ? diag::note_method_declared_at
> - : diag::note_previous_decl) << Name;
> - if (ObjCPropery)
> - S.Diag(ObjCPropery->getLocation(), diag::note_property_attribute)
> - << ObjCPropery->getDeclName() << 0;
> + S.Diag(Loc, diag) << Name;
> +// S.Diag(D->getLocation(), diag::note_availability_specified_here)
> +// << D << available_here_select_kind;
This as well?
> + if (ObjCProperty)
> + S.Diag(ObjCProperty->getLocation(), diag::note_property_attribute)
> + << ObjCProperty->getDeclName() << property_note_select;
> } else {
> - S.Diag(Loc, diag::warn_deprecated_fwdclass_message) << Name;
> + S.Diag(Loc, diag_fwdclass_message) << Name;
> S.Diag(UnknownObjCClass->getLocation(), diag::note_forward_class);
> }
> -}
>
> -void Sema::HandleDelayedDeprecationCheck(DelayedDiagnostic &DD,
> - Decl *Ctx) {
> - if (isDeclDeprecated(Ctx))
> - return;
> + S.Diag(D->getLocation(), diag::note_availability_specified_here)
> + << D << available_here_select_kind;
> +}
>
> +void Sema::HandleDelayedAvailabilityCheck(DelayedDiagnostic &DD,
> + Decl *Ctx) {
> DD.Triggered = true;
> - DoEmitDeprecationWarning(*this, DD.getDeprecationDecl(),
> - DD.getDeprecationMessage(), DD.Loc,
> - DD.getUnknownObjCClass(),
> - DD.getObjCProperty());
> + DoEmitAvailabilityWarning(*this,
> + (DelayedDiagnostic::DDKind) DD.Kind,
> + Ctx,
> + DD.getDeprecationDecl(),
> + DD.getDeprecationMessage(),
> + DD.Loc,
> + DD.getUnknownObjCClass(),
> + DD.getObjCProperty());
> }
>
> -void Sema::EmitDeprecationWarning(NamedDecl *D, StringRef Message,
> - SourceLocation Loc,
> - const ObjCInterfaceDecl *UnknownObjCClass,
> - const ObjCPropertyDecl *ObjCProperty) {
> +void Sema::EmitAvailabilityWarning(AvailabilityDiagnostic AD,
> + NamedDecl *D, StringRef Message,
> + SourceLocation Loc,
> + const ObjCInterfaceDecl *UnknownObjCClass,
> + const ObjCPropertyDecl *ObjCProperty) {
> // Delay if we're currently parsing a declaration.
> if (DelayedDiagnostics.shouldDelayDiagnostics()) {
> - DelayedDiagnostics.add(DelayedDiagnostic::makeDeprecation(Loc, D,
> - UnknownObjCClass,
> - ObjCProperty,
> - Message));
> + DelayedDiagnostics.add(DelayedDiagnostic::makeAvailability(AD, Loc, D,
> + UnknownObjCClass,
> + ObjCProperty,
> + Message));
> return;
> }
>
> - // Otherwise, don't warn if our current context is deprecated.
> - if (isDeclDeprecated(cast<Decl>(getCurLexicalContext())))
> - return;
> - DoEmitDeprecationWarning(*this, D, Message, Loc, UnknownObjCClass, ObjCProperty);
> + Decl *Ctx = cast<Decl>(getCurLexicalContext());
> + DelayedDiagnostic::DDKind K;
> + switch (AD) {
> + case AD_Deprecation:
> + K = DelayedDiagnostic::Deprecation;
> + break;
> + case AD_Unavailable:
> + K = DelayedDiagnostic::Unavailable;
> + break;
> + }
> +
> + DoEmitAvailabilityWarning(*this, K, Ctx, D, Message, Loc,
> + UnknownObjCClass, ObjCProperty);
> }
>
> Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Dec 18 17:30:06 2013
> @@ -112,32 +112,16 @@ static AvailabilityResult DiagnoseAvaila
>
> case AR_Deprecated:
> if (S.getCurContextAvailability() != AR_Deprecated)
> - S.EmitDeprecationWarning(D, Message, Loc, UnknownObjCClass, ObjCPDecl);
> + S.EmitAvailabilityWarning(Sema::AD_Deprecation,
> + D, Message, Loc, UnknownObjCClass, ObjCPDecl);
> break;
> -
> +
> case AR_Unavailable:
> - if (S.getCurContextAvailability() != AR_Unavailable) {
> - if (Message.empty()) {
> - if (!UnknownObjCClass) {
> - S.Diag(Loc, diag::err_unavailable) << D->getDeclName();
> - if (ObjCPDecl)
> - S.Diag(ObjCPDecl->getLocation(), diag::note_property_attribute)
> - << ObjCPDecl->getDeclName() << 1;
> - }
> - else
> - S.Diag(Loc, diag::warn_unavailable_fwdclass_message)
> - << D->getDeclName();
> - }
> - else
> - S.Diag(Loc, diag::err_unavailable_message)
> - << D->getDeclName() << Message;
> - S.Diag(D->getLocation(), diag::note_unavailable_here)
> - << isa<FunctionDecl>(D) << false;
> - if (ObjCPDecl)
> - S.Diag(ObjCPDecl->getLocation(), diag::note_property_attribute)
> - << ObjCPDecl->getDeclName() << 1;
> - }
> + if (S.getCurContextAvailability() != AR_Unavailable)
> + S.EmitAvailabilityWarning(Sema::AD_Unavailable,
> + D, Message, Loc, UnknownObjCClass, ObjCPDecl);
> break;
> +
> }
> return Result;
> }
> @@ -177,8 +161,8 @@ void Sema::NoteDeletedFunction(FunctionD
> }
> }
>
> - Diag(Decl->getLocation(), diag::note_unavailable_here)
> - << 1 << true;
> + Diag(Decl->getLocation(), diag::note_availability_specified_here)
> + << Decl << true;
> }
>
> /// \brief Determine whether a FunctionDecl was ever declared with an
>
> Modified: cfe/trunk/test/ARCMT/checking.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/checking.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/ARCMT/checking.m (original)
> +++ cfe/trunk/test/ARCMT/checking.m Wed Dec 18 17:30:06 2013
> @@ -44,9 +44,9 @@ struct UnsafeS {
> };
>
> @interface A : NSObject
> -- (id)retain; // expected-note {{declaration has been explicitly marked unavailable here}}
> -- (id)retainCount; // expected-note {{declaration has been explicitly marked unavailable here}}
> -- (id)autorelease; // expected-note 2 {{declaration has been explicitly marked unavailable here}}
> +- (id)retain; // expected-note {{'retain' has been explicitly marked unavailable here}}
> +- (id)retainCount; // expected-note {{'retainCount' has been explicitly marked unavailable here}}
> +- (id)autorelease; // expected-note 2 {{'autorelease' has been explicitly marked unavailable here}}
> - (id)init;
> - (oneway void)release;
> - (void)dealloc;
>
> Modified: cfe/trunk/test/Analysis/retain-release.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Analysis/retain-release.m (original)
> +++ cfe/trunk/test/Analysis/retain-release.m Wed Dec 18 17:30:06 2013
> @@ -210,7 +210,7 @@ typedef struct IONotificationPort * IONo
> typedef void (*IOServiceMatchingCallback)( void * refcon, io_iterator_t iterator );
> io_service_t IOServiceGetMatchingService( mach_port_t masterPort, CFDictionaryRef matching );
> kern_return_t IOServiceGetMatchingServices( mach_port_t masterPort, CFDictionaryRef matching, io_iterator_t * existing );
> -kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
> +kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' has been explicitly marked deprecated here}}
> kern_return_t IOServiceAddMatchingNotification( IONotificationPortRef notifyPort, const io_name_t notificationType, CFDictionaryRef matching, IOServiceMatchingCallback callback, void * refCon, io_iterator_t * notification );
> CFMutableDictionaryRef IOServiceMatching( const char * name );
> CFMutableDictionaryRef IOServiceNameMatching( const char * name );
>
> Modified: cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp (original)
> +++ cfe/trunk/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp Wed Dec 18 17:30:06 2013
> @@ -1,25 +1,25 @@
> // RUN: %clang_cc1 -std=c++1y -verify %s
>
> -class [[deprecated]] C {}; // expected-note {{declared here}}
> +class [[deprecated]] C {}; // expected-note {{'C' has been explicitly marked deprecated here}}
> C c; // expected-warning {{'C' is deprecated}}
>
> -typedef int t [[deprecated]]; // expected-note {{declared here}}
> +typedef int t [[deprecated]]; // expected-note {{'t' has been explicitly marked deprecated here}}
> t x = 42; // expected-warning {{'t' is deprecated}}
>
> -[[deprecated]] int old = 42; // expected-note {{declared here}}
> +[[deprecated]] int old = 42; // expected-note {{'old' has been explicitly marked deprecated here}}
> int use = old; // expected-warning {{'old' is deprecated}}
>
> -struct S { [[deprecated]] int member = 42; } s; // expected-note {{declared here}}
> +struct S { [[deprecated]] int member = 42; } s; // expected-note {{'member' has been explicitly marked deprecated here}}
> int use2 = s.member; // expected-warning {{'member' is deprecated}}
>
> -[[deprecated]] int f() { return 42; } // expected-note {{declared here}}
> +[[deprecated]] int f() { return 42; } // expected-note {{'f' has been explicitly marked deprecated here}}
> int use3 = f(); // expected-warning {{'f' is deprecated}}
>
> -enum [[deprecated]] e { E }; // expected-note {{declared here}}
> +enum [[deprecated]] e { E }; // expected-note {{'e' has been explicitly marked deprecated here}}
> e my_enum; // expected-warning {{'e' is deprecated}}
>
> template <typename T> class X {};
> -template <> class [[deprecated]] X<int> {}; // expected-note {{declared here}}
> +template <> class [[deprecated]] X<int> {}; // expected-note {{'X<int>' has been explicitly marked deprecated here}}
> X<char> x1;
> // FIXME: The diagnostic here could be much better by mentioning X<int>.
> X<int> x2; // expected-warning {{'X' is deprecated}}
>
> Modified: cfe/trunk/test/CXX/special/class.copy/p33-0x.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.copy/p33-0x.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/CXX/special/class.copy/p33-0x.cpp (original)
> +++ cfe/trunk/test/CXX/special/class.copy/p33-0x.cpp Wed Dec 18 17:30:06 2013
> @@ -27,7 +27,7 @@ namespace PR10142 {
> struct X {
> X();
> X(X&&);
> - X(const X&) = delete; // expected-note 2{{function has been explicitly marked deleted here}}
> + X(const X&) = delete; // expected-note 2{{'X' has been explicitly marked deleted here}}
> };
>
> void f(int i) {
>
> Modified: cfe/trunk/test/CXX/special/class.inhctor/p4.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.inhctor/p4.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/CXX/special/class.inhctor/p4.cpp (original)
> +++ cfe/trunk/test/CXX/special/class.inhctor/p4.cpp Wed Dec 18 17:30:06 2013
> @@ -43,8 +43,8 @@ FA fa2{X<2>{}}; // expected-error {{call
>
> // It is deleted if the corresponding constructor [...] is deleted.
> struct G {
> - G(int) = delete; // expected-note {{function has been explicitly marked deleted here}}
> - template<typename T> G(T*) = delete; // expected-note {{function has been explicitly marked deleted here}}
> + G(int) = delete; // expected-note {{'G' has been explicitly marked deleted here}}
> + template<typename T> G(T*) = delete; // expected-note {{'G<const char>' has been explicitly marked deleted here}}
> };
> struct H : G {
> using G::G; // expected-note 2{{deleted constructor was inherited here}}
>
> Modified: cfe/trunk/test/CXX/special/class.temporary/p1.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.temporary/p1.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/CXX/special/class.temporary/p1.cpp (original)
> +++ cfe/trunk/test/CXX/special/class.temporary/p1.cpp Wed Dec 18 17:30:06 2013
> @@ -6,7 +6,7 @@ namespace test0 {
> int x;
> int y;
>
> - A(const A&) = delete; // expected-note {{function has been explicitly marked deleted here}}
> + A(const A&) = delete; // expected-note {{'A' has been explicitly marked deleted here}}
> };
>
> void foo(...);
>
> Modified: cfe/trunk/test/Headers/ms-intrin.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/ms-intrin.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Headers/ms-intrin.cpp (original)
> +++ cfe/trunk/test/Headers/ms-intrin.cpp Wed Dec 18 17:30:06 2013
> @@ -18,7 +18,7 @@ void bar() {
> _WriteBarrier(); // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
> // FIXME: It'd be handy if we didn't have to hardcode the line number in
> // intrin.h.
> - // expected-note at Intrin.h:754 {{declared here}}
> - // expected-note at Intrin.h:759 {{declared here}}
> - // expected-note at Intrin.h:764 {{declared here}}
> + // expected-note at Intrin.h:754 {{'_ReadWriteBarrier' has been explicitly marked deprecated here}}
> + // expected-note at Intrin.h:759 {{'_ReadBarrier' has been explicitly marked deprecated here}}
> + // expected-note at Intrin.h:764 {{'_WriteBarrier' has been explicitly marked deprecated here}}
> }
>
> Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
> +++ cfe/trunk/test/Parser/MicrosoftExtensions.c Wed Dec 18 17:30:06 2013
> @@ -71,8 +71,8 @@ char x = FOO(a);
> typedef enum E { e1 };
>
>
> -enum __declspec(deprecated) E2 { i, j, k }; // expected-note {{declared here}}
> -__declspec(deprecated) enum E3 { a, b, c } e; // expected-note {{declared here}}
> +enum __declspec(deprecated) E2 { i, j, k }; // expected-note {{'E2' has been explicitly marked deprecated here}}
> +__declspec(deprecated) enum E3 { a, b, c } e; // expected-note {{'e' has been explicitly marked deprecated here}}
>
> void deprecated_enum_test(void)
> {
> @@ -111,7 +111,7 @@ struct __declspec(unknown(12) deprecated
>
> struct S7 {
> int foo() { return 12; }
> - __declspec(property(get=foo) deprecated) int t; // expected-note {{declared here}}
> + __declspec(property(get=foo) deprecated) int t; // expected-note {{'t' has been explicitly marked deprecated here}}
> };
>
> /* Technically, this is legal (though it does nothing) */
>
> Modified: cfe/trunk/test/Sema/MicrosoftExtensions.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/MicrosoftExtensions.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/MicrosoftExtensions.c (original)
> +++ cfe/trunk/test/Sema/MicrosoftExtensions.c Wed Dec 18 17:30:06 2013
> @@ -87,11 +87,11 @@ typedef struct {
> AA; // expected-warning {{anonymous structs are a Microsoft extension}}
> } BB;
>
> -__declspec(deprecated("This is deprecated")) enum DE1 { one, two } e1; // expected-note {{'e1' declared here}}
> -struct __declspec(deprecated) DS1 { int i; float f; }; // expected-note {{declared here}}
> +__declspec(deprecated("This is deprecated")) enum DE1 { one, two } e1; // expected-note {{'e1' has been explicitly marked deprecated here}}
> +struct __declspec(deprecated) DS1 { int i; float f; }; // expected-note {{'DS1' has been explicitly marked deprecated here}}
>
> #define MY_TEXT "This is also deprecated"
> -__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' declared here}}
> +__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' has been explicitly marked deprecated here}}
>
> struct __declspec(deprecated(123)) DS2 {}; // expected-error {{'deprecated' attribute requires a string}}
>
>
> Modified: cfe/trunk/test/Sema/attr-availability-ios.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability-ios.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-availability-ios.c (original)
> +++ cfe/trunk/test/Sema/attr-availability-ios.c Wed Dec 18 17:30:06 2013
> @@ -1,14 +1,14 @@
> // RUN: %clang_cc1 "-triple" "x86_64-apple-ios3.0" -fsyntax-only -verify %s
>
> -void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1))); // expected-note {{'f0' declared here}}
> +void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1))); // expected-note {{'f0' has been explicitly marked deprecated here}}
> void f1(int) __attribute__((availability(ios,introduced=2.1)));
> -void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'f2' declared here}}
> +void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'f2' has been explicitly marked deprecated here}}
> void f3(int) __attribute__((availability(ios,introduced=3.0)));
> void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}
>
> -void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'f5' declared here}}
> +void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'f5' has been explicitly marked deprecated here}}
> void f6(int) __attribute__((availability(ios,deprecated=3.0)));
> -void f6(int) __attribute__((availability(ios,introduced=2.0))); // expected-note {{'f6' declared here}}
> +void f6(int) __attribute__((availability(ios,introduced=2.0))); // expected-note {{'f6' has been explicitly marked deprecated here}}
>
> void test() {
> f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
>
> Modified: cfe/trunk/test/Sema/attr-availability-macosx.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability-macosx.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-availability-macosx.c (original)
> +++ cfe/trunk/test/Sema/attr-availability-macosx.c Wed Dec 18 17:30:06 2013
> @@ -2,10 +2,10 @@
>
> void f0(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6)));
> void f1(int) __attribute__((availability(macosx,introduced=10.5)));
> -void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5))); // expected-note {{'f2' declared here}}
> +void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5))); // expected-note {{'f2' has been explicitly marked deprecated here}}
> void f3(int) __attribute__((availability(macosx,introduced=10.6)));
> void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
> -void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{function has been explicitly marked unavailable here}}
> +void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
>
> void test() {
> f0(0);
>
> Modified: cfe/trunk/test/Sema/attr-availability.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-availability.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-availability.c (original)
> +++ cfe/trunk/test/Sema/attr-availability.c Wed Dec 18 17:30:06 2013
> @@ -8,10 +8,10 @@ void f3() __attribute__((availability(ot
>
> // rdar://10095131
> extern void
> -ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName"))); // expected-note {{'ATSFontGetName' declared here}}
> +ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName"))); // expected-note {{'ATSFontGetName' has been explicitly marked deprecated here}}
>
> extern void
> -ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0, message="use ATSFontGetFullPostScriptName"))); // expected-note {{function has been explicitly marked unavailable here}}
> +ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0, message="use ATSFontGetFullPostScriptName"))); // expected-note {{'ATSFontGetPostScriptName' has been explicitly marked unavailable here}}
>
> void test_10095131() {
> ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in OS X 9.0 - use CTFontCopyFullName}}
>
> Modified: cfe/trunk/test/Sema/attr-cleanup.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-cleanup.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-cleanup.c (original)
> +++ cfe/trunk/test/Sema/attr-cleanup.c Wed Dec 18 17:30:06 2013
> @@ -38,7 +38,7 @@ void t4() {
> __attribute((cleanup(c4))) void* g;
> }
>
> -void c5(void*) __attribute__((deprecated)); // expected-note{{'c5' declared here}}
> +void c5(void*) __attribute__((deprecated)); // expected-note{{'c5' has been explicitly marked deprecated here}}
> void t5() {
> int i __attribute__((cleanup(c5))); // expected-warning {{'c5' is deprecated}}
> }
>
> Modified: cfe/trunk/test/Sema/attr-deprecated-message.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-deprecated-message.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-deprecated-message.c (original)
> +++ cfe/trunk/test/Sema/attr-deprecated-message.c Wed Dec 18 17:30:06 2013
> @@ -1,7 +1,7 @@
> // RUN: %clang_cc1 %s -verify -fsyntax-only
> // rdar: // 6734520
>
> -typedef int INT1 __attribute__((deprecated("Please avoid INT1"))); // expected-note 3 {{'INT1' declared here}}
> +typedef int INT1 __attribute__((deprecated("Please avoid INT1"))); // expected-note 3 {{'INT1' has been explicitly marked deprecated here}}
>
> typedef INT1 INT2 __attribute__ ((__deprecated__("Please avoid INT2")));
>
> @@ -12,16 +12,16 @@ typedef INT1 INT1b __attribute__ ((depre
> INT1 should_be_unavailable; // expected-warning {{'INT1' is deprecated: Please avoid INT1}}
> INT1a should_not_be_deprecated;
>
> -INT1 f1(void) __attribute__ ((deprecated("Please avoid f1"))); // expected-note {{'f1' declared here}}
> +INT1 f1(void) __attribute__ ((deprecated("Please avoid f1"))); // expected-note {{'f1' has been explicitly marked deprecated here}}
> INT1 f2(void); // expected-warning {{'INT1' is deprecated: Please avoid INT1}}
>
> -typedef enum {red, green, blue} Color __attribute__((deprecated("Please avoid Color"))); // expected-note {{'Color' declared here}}
> +typedef enum {red, green, blue} Color __attribute__((deprecated("Please avoid Color"))); // expected-note {{'Color' has been explicitly marked deprecated here}}
>
>
> Color c1; // expected-warning {{'Color' is deprecated: Please avoid Color}}
>
> int g1;
> -int g2 __attribute__ ((deprecated("Please avoid g2"))); // expected-note {{'g2' declared here}}
> +int g2 __attribute__ ((deprecated("Please avoid g2"))); // expected-note {{'g2' has been explicitly marked deprecated here}}
>
> int func1()
> {
>
> Modified: cfe/trunk/test/Sema/attr-deprecated.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-deprecated.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-deprecated.c (original)
> +++ cfe/trunk/test/Sema/attr-deprecated.c Wed Dec 18 17:30:06 2013
> @@ -1,10 +1,10 @@
> // RUN: %clang_cc1 %s -verify -fsyntax-only
>
> -int f() __attribute__((deprecated)); // expected-note 2 {{declared here}}
> +int f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
> void g() __attribute__((deprecated));
> -void g(); // expected-note {{declared here}}
> +void g(); // expected-note {{'g' has been explicitly marked deprecated here}}
>
> -extern int var __attribute__((deprecated)); // expected-note {{declared here}}
> +extern int var __attribute__((deprecated)); // expected-note {{'var' has been explicitly marked deprecated here}}
>
> int a() {
> int (*ptr)() = f; // expected-warning {{'f' is deprecated}}
> @@ -17,13 +17,13 @@ int a() {
> }
>
> // test if attributes propagate to variables
> -extern int var; // expected-note {{declared here}}
> +extern int var; // expected-note {{'var' has been explicitly marked deprecated here}}
> int w() {
> return var; // expected-warning {{'var' is deprecated}}
> }
>
> int old_fn() __attribute__ ((deprecated));
> -int old_fn(); // expected-note {{declared here}}
> +int old_fn(); // expected-note {{'old_fn' has been explicitly marked deprecated here}}
> int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}}
>
> int old_fn() {
> @@ -32,7 +32,7 @@ int old_fn() {
>
>
> struct foo {
> - int x __attribute__((deprecated)); // expected-note 3 {{declared here}}
> + int x __attribute__((deprecated)); // expected-note 3 {{'x' has been explicitly marked deprecated here}}
> };
>
> void test1(struct foo *F) {
> @@ -41,11 +41,11 @@ void test1(struct foo *F) {
> struct foo f2 = { 17 }; // expected-warning {{'x' is deprecated}}
> }
>
> -typedef struct foo foo_dep __attribute__((deprecated)); // expected-note 12 {{declared here}}
> +typedef struct foo foo_dep __attribute__((deprecated)); // expected-note 12 {{'foo_dep' has been explicitly marked deprecated here}}
> foo_dep *test2; // expected-warning {{'foo_dep' is deprecated}}
>
> struct __attribute__((deprecated,
> - invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} expected-note 2 {{declared here}}
> + invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} expected-note 2 {{'bar_dep' has been explicitly marked deprecated here}}
>
> struct bar_dep *test3; // expected-warning {{'bar_dep' is deprecated}}
>
> @@ -102,9 +102,9 @@ foo_dep test17, // expected-warning {{'f
> test19;
>
> // rdar://problem/8518751
> -enum __attribute__((deprecated)) Test20 { // expected-note {{declared here}}
> - test20_a __attribute__((deprecated)), // expected-note {{declared here}}
> - test20_b // expected-note {{declared here}}
> +enum __attribute__((deprecated)) Test20 { // expected-note {{'Test20' has been explicitly marked deprecated here}}
> + test20_a __attribute__((deprecated)), // expected-note {{'test20_a' has been explicitly marked deprecated here}}
> + test20_b // expected-note {{'test20_b' has been explicitly marked deprecated here}}
> };
> void test20() {
> enum Test20 f; // expected-warning {{'Test20' is deprecated}}
> @@ -122,5 +122,5 @@ struct test22 {
> };
>
> typedef int test23_ty __attribute((deprecated)); // expected-note {{previous definition is here}}
> -typedef int test23_ty; // expected-note {{'test23_ty' declared here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
> +typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
> test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}
>
> Modified: cfe/trunk/test/Sema/attr-unavailable-message.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-unavailable-message.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/attr-unavailable-message.c (original)
> +++ cfe/trunk/test/Sema/attr-unavailable-message.c Wed Dec 18 17:30:06 2013
> @@ -1,8 +1,8 @@
> // RUN: %clang_cc1 -fsyntax-only -verify %s
> // rdar: //6734520
>
> -int foo(int) __attribute__((__unavailable__("USE IFOO INSTEAD"))); // expected-note {{function has been explicitly marked unavailable here}}
> -double dfoo(double) __attribute__((__unavailable__("NO LONGER"))); // expected-note 2 {{function has been explicitly marked unavailable here}}
> +int foo(int) __attribute__((__unavailable__("USE IFOO INSTEAD"))); // expected-note {{'foo' has been explicitly marked unavailable here}}
> +double dfoo(double) __attribute__((__unavailable__("NO LONGER"))); // expected-note 2 {{'dfoo' has been explicitly marked unavailable here}}
>
> void bar() __attribute__((__unavailable__)); // expected-note {{explicitly marked unavailable}}
>
> @@ -34,13 +34,13 @@ void unavail(void) {
>
> // rdar://10201690
> enum foo {
> - a = 1, // expected-note {{declared here}}
> - b __attribute__((deprecated())) = 2, // expected-note {{declared here}}
> + a = 1, // expected-note {{'a' has been explicitly marked deprecated here}}
> + b __attribute__((deprecated())) = 2, // expected-note {{'b' has been explicitly marked deprecated here}}
> c = 3
> }__attribute__((deprecated()));
>
> -enum fee { // expected-note {{declaration has been explicitly marked unavailable here}}
> - r = 1, // expected-note {{declaration has been explicitly marked unavailable here}}
> +enum fee { // expected-note {{'fee' has been explicitly marked unavailable here}}
> + r = 1, // expected-note {{'r' has been explicitly marked unavailable here}}
> s = 2,
> t = 3
> }__attribute__((unavailable()));
>
> Modified: cfe/trunk/test/Sema/typeof-use-deprecated.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/typeof-use-deprecated.c?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/typeof-use-deprecated.c (original)
> +++ cfe/trunk/test/Sema/typeof-use-deprecated.c Wed Dec 18 17:30:06 2013
> @@ -1,25 +1,25 @@
> // RUN: %clang_cc1 %s -verify -fsyntax-only
>
> -struct s { int a; } __attribute__((deprecated)) x; // expected-warning {{'s' is deprecated}} expected-note 2 {{'s' declared here}}
> +struct s { int a; } __attribute__((deprecated)) x; // expected-warning {{'s' is deprecated}} expected-note 2 {{'s' has been explicitly marked deprecated here}}
>
> typeof(x) y; // expected-warning {{'s' is deprecated}}
>
> -union un{ int a; } __attribute__((deprecated)) u; // expected-warning {{'un' is deprecated}} expected-note 2 {{'un' declared here}}
> +union un{ int a; } __attribute__((deprecated)) u; // expected-warning {{'un' is deprecated}} expected-note 2 {{'un' has been explicitly marked deprecated here}}
>
> typeof( u) z; // expected-warning {{'un' is deprecated}}
>
> -enum E{ one} __attribute__((deprecated)) e; // expected-warning {{'E' is deprecated}} expected-note 2 {{'E' declared here}}
> +enum E{ one} __attribute__((deprecated)) e; // expected-warning {{'E' is deprecated}} expected-note 2 {{'E' has been explicitly marked deprecated here}}
>
> typeof( e) w; // expected-warning {{'E' is deprecated}}
>
> -struct foo { int x; } __attribute__((deprecated)); // expected-note {{'foo' declared here}}
> -typedef struct foo bar __attribute__((deprecated)); // expected-note {{'bar' declared here}}
> +struct foo { int x; } __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
> +typedef struct foo bar __attribute__((deprecated)); // expected-note {{'bar' has been explicitly marked deprecated here}}
> bar x1; // expected-warning {{'bar' is deprecated}}
>
> int main() { typeof(x1) y; } // expected-warning {{'foo' is deprecated}}
>
> struct gorf { int x; };
> -typedef struct gorf T __attribute__((deprecated)); // expected-note {{'T' declared here}}
> +typedef struct gorf T __attribute__((deprecated)); // expected-note {{'T' has been explicitly marked deprecated here}}
> T t; // expected-warning {{'T' is deprecated}}
> void wee() { typeof(t) y; }
>
>
> Modified: cfe/trunk/test/SemaCXX/aggregate-initialization.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/aggregate-initialization.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/aggregate-initialization.cpp (original)
> +++ cfe/trunk/test/SemaCXX/aggregate-initialization.cpp Wed Dec 18 17:30:06 2013
> @@ -49,7 +49,7 @@ struct A {
> A(int);
> ~A();
>
> - A(const A&) = delete; // expected-note 2 {{function has been explicitly marked deleted here}}
> + A(const A&) = delete; // expected-note 2 {{'A' has been explicitly marked deleted here}}
> };
>
> struct B {
>
> Modified: cfe/trunk/test/SemaCXX/attr-deprecated.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-deprecated.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/attr-deprecated.cpp (original)
> +++ cfe/trunk/test/SemaCXX/attr-deprecated.cpp Wed Dec 18 17:30:06 2013
> @@ -1,10 +1,10 @@
> // RUN: %clang_cc1 %s -verify -fexceptions
> class A {
> - void f() __attribute__((deprecated)); // expected-note 2 {{declared here}}
> + void f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
> void g(A* a);
> void h(A* a) __attribute__((deprecated));
>
> - int b __attribute__((deprecated)); // expected-note 2 {{declared here}}
> + int b __attribute__((deprecated)); // expected-note 2 {{'b' has been explicitly marked deprecated here}}
> };
>
> void A::g(A* a)
> @@ -26,7 +26,7 @@ void A::h(A* a)
> }
>
> struct B {
> - virtual void f() __attribute__((deprecated)); // expected-note 4 {{declared here}}
> + virtual void f() __attribute__((deprecated)); // expected-note 4 {{'f' has been explicitly marked deprecated here}}
> void g();
> };
>
> @@ -68,20 +68,20 @@ void f(D* d) {
>
> // Overloaded namespace members.
> namespace test1 {
> - void foo(int) __attribute__((deprecated)); // expected-note {{declared here}}
> + void foo(int) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
> void test1() { foo(10); } // expected-warning {{deprecated}}
> - void foo(short) __attribute__((deprecated)); // expected-note {{declared here}}
> + void foo(short) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
> void test2(short s) { foo(s); } // expected-warning {{deprecated}}
> void foo(long);
> void test3(long l) { foo(l); }
> struct A {
> - friend void foo(A*) __attribute__((deprecated)); // expected-note {{declared here}}
> + friend void foo(A*) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
> };
> void test4(A *a) { foo(a); } // expected-warning {{deprecated}}
>
> namespace ns {
> struct Foo {};
> - void foo(const Foo &f) __attribute__((deprecated)); // expected-note {{declared here}}
> + void foo(const Foo &f) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
> }
> void test5() {
> foo(ns::Foo()); // expected-warning {{deprecated}}
> @@ -91,9 +91,9 @@ namespace test1 {
> // Overloaded class members.
> namespace test2 {
> struct A {
> - void foo(int) __attribute__((deprecated)); // expected-note 2 {{declared here}}
> + void foo(int) __attribute__((deprecated)); // expected-note 2 {{'foo' has been explicitly marked deprecated here}}
> void foo(long);
> - static void bar(int) __attribute__((deprecated)); // expected-note 3 {{declared here}}
> + static void bar(int) __attribute__((deprecated)); // expected-note 3 {{'bar' has been explicitly marked deprecated here}}
> static void bar(long);
>
> void test2(int i, long l);
> @@ -120,12 +120,12 @@ namespace test2 {
> namespace test3 {
> struct A {
> void operator*(const A &);
> - void operator*(int) __attribute__((deprecated)); // expected-note {{declared here}}
> + void operator*(int) __attribute__((deprecated)); // expected-note {{'operator*' has been explicitly marked deprecated here}}
> void operator-(const A &) const;
> };
> void operator+(const A &, const A &);
> - void operator+(const A &, int) __attribute__((deprecated)); // expected-note {{declared here}}
> - void operator-(const A &, int) __attribute__((deprecated)); // expected-note {{declared here}}
> + void operator+(const A &, int) __attribute__((deprecated)); // expected-note {{'operator+' has been explicitly marked deprecated here}}
> + void operator-(const A &, int) __attribute__((deprecated)); // expected-note {{'operator-' has been explicitly marked deprecated here}}
>
> void test() {
> A a, b;
> @@ -143,9 +143,9 @@ namespace test4 {
> struct A {
> typedef void (*intfn)(int);
> typedef void (*unintfn)(unsigned);
> - operator intfn() __attribute__((deprecated)); // expected-note {{declared here}}
> + operator intfn() __attribute__((deprecated)); // expected-note {{'operator void (*)(int)' has been explicitly marked deprecated here}}
> operator unintfn();
> - void operator ()(A &) __attribute__((deprecated)); // expected-note {{declared here}}
> + void operator ()(A &) __attribute__((deprecated)); // expected-note {{'operator()' has been explicitly marked deprecated here}}
> void operator ()(const A &);
> };
>
> @@ -163,7 +163,7 @@ namespace test4 {
>
> namespace test5 {
> struct A {
> - operator int() __attribute__((deprecated)); // expected-note 3 {{declared here}}
> + operator int() __attribute__((deprecated)); // expected-note 3 {{'operator int' has been explicitly marked deprecated here}}
> operator long();
> };
> void test1(A a) {
> @@ -193,8 +193,8 @@ namespace test5 {
>
> // rdar://problem/8518751
> namespace test6 {
> - enum __attribute__((deprecated)) A { // expected-note {{declared here}}
> - a0 // expected-note {{declared here}}
> + enum __attribute__((deprecated)) A { // expected-note {{'A' has been explicitly marked deprecated here}}
> + a0 // expected-note {{'a0' has been explicitly marked deprecated here}}
> };
> void testA() {
> A x; // expected-warning {{'A' is deprecated}}
> @@ -202,7 +202,7 @@ namespace test6 {
> }
>
> enum B {
> - b0 __attribute__((deprecated)), // expected-note {{declared here}}
> + b0 __attribute__((deprecated)), // expected-note {{'b0' has been explicitly marked deprecated here}}
> b1
> };
> void testB() {
> @@ -212,8 +212,8 @@ namespace test6 {
> }
>
> template <class T> struct C {
> - enum __attribute__((deprecated)) Enum { // expected-note {{declared here}}
> - c0 // expected-note {{declared here}}
> + enum __attribute__((deprecated)) Enum { // expected-note {{'Enum' has been explicitly marked deprecated here}}
> + c0 // expected-note {{'c0' has been explicitly marked deprecated here}}
> };
> };
> void testC() {
> @@ -224,7 +224,7 @@ namespace test6 {
> template <class T> struct D {
> enum Enum {
> d0,
> - d1 __attribute__((deprecated)), // expected-note {{declared here}}
> + d1 __attribute__((deprecated)), // expected-note {{'d1' has been explicitly marked deprecated here}}
> };
> };
> void testD() {
> @@ -236,8 +236,8 @@ namespace test6 {
>
> namespace test7 {
> struct X {
> - void* operator new(typeof(sizeof(void*))) __attribute__((deprecated)); // expected-note{{'operator new' declared here}}
> - void operator delete(void *) __attribute__((deprecated)); // expected-note{{'operator delete' declared here}}
> + void* operator new(typeof(sizeof(void*))) __attribute__((deprecated)); // expected-note{{'operator new' has been explicitly marked deprecated here}}
> + void operator delete(void *) __attribute__((deprecated)); // expected-note{{'operator delete' has been explicitly marked deprecated here}}
> };
>
> void test() {
> @@ -247,6 +247,6 @@ namespace test7 {
>
> // rdar://problem/15044218
> typedef struct TDS {
> -} TDS __attribute__((deprecated)); // expected-note {{'TDS' declared here}}
> +} TDS __attribute__((deprecated)); // expected-note {{'TDS' has been explicitly marked deprecated here}}
> TDS tds; // expected-warning {{'TDS' is deprecated}}
> struct TDS tds2; // no warning, attribute only applies to the typedef.
>
> Modified: cfe/trunk/test/SemaCXX/attr-unavailable.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/attr-unavailable.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/attr-unavailable.cpp (original)
> +++ cfe/trunk/test/SemaCXX/attr-unavailable.cpp Wed Dec 18 17:30:06 2013
> @@ -3,7 +3,7 @@
> int &foo(int); // expected-note {{candidate}}
> double &foo(double); // expected-note {{candidate}}
> void foo(...) __attribute__((__unavailable__)); // expected-note {{candidate function}} \
> -// expected-note{{function has been explicitly marked unavailable here}}
> +// expected-note{{'foo' has been explicitly marked unavailable here}}
>
> void bar(...) __attribute__((__unavailable__)); // expected-note 2{{explicitly marked unavailable}}
>
> @@ -37,3 +37,22 @@ void unavail(short* sp) {
> foo(sp);
> foo();
> }
> +
> +// Show that delayed processing of 'unavailable' is the same
> +// delayed process for 'deprecated'.
> +// <rdar://problem/12241361> and <rdar://problem/15584219>
> +enum DeprecatedEnum { DE_A, DE_B } __attribute__((deprecated)); // expected-note {{'DeprecatedEnum' has been explicitly marked deprecated here}}
> +__attribute__((deprecated)) typedef enum DeprecatedEnum DeprecatedEnum;
> +typedef enum DeprecatedEnum AnotherDeprecatedEnum; // expected-warning {{'DeprecatedEnum' is deprecated}}
> +
> +__attribute__((deprecated))
> +DeprecatedEnum testDeprecated(DeprecatedEnum X) { return X; }
> +
> +
> +enum UnavailableEnum { UE_A, UE_B } __attribute__((unavailable)); // expected-note {{'UnavailableEnum' has been explicitly marked unavailable here}}
> +__attribute__((unavailable)) typedef enum UnavailableEnum UnavailableEnum;
> +typedef enum UnavailableEnum AnotherUnavailableEnum; // expected-error {{'UnavailableEnum' is unavailable}}
> +
> +
> +__attribute__((unavailable))
> +UnavailableEnum testUnavailable(UnavailableEnum X) { return X; }
>
> Modified: cfe/trunk/test/SemaCXX/cxx0x-delegating-ctors.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx0x-delegating-ctors.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/cxx0x-delegating-ctors.cpp (original)
> +++ cfe/trunk/test/SemaCXX/cxx0x-delegating-ctors.cpp Wed Dec 18 17:30:06 2013
> @@ -43,7 +43,7 @@ foo::foo (void*) : foo(4.0f) {
> }
>
> struct deleted_dtor {
> - ~deleted_dtor() = delete; // expected-note{{function has been explicitly marked deleted here}}
> + ~deleted_dtor() = delete; // expected-note{{'~deleted_dtor' has been explicitly marked deleted here}}
> deleted_dtor();
> deleted_dtor(int) : deleted_dtor() // expected-error{{attempt to use a deleted function}}
> {}
>
> Modified: cfe/trunk/test/SemaCXX/deleted-function.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/deleted-function.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/deleted-function.cpp (original)
> +++ cfe/trunk/test/SemaCXX/deleted-function.cpp Wed Dec 18 17:30:06 2013
> @@ -15,9 +15,9 @@ void ov(int) {} // expected-note {{candi
> void ov(double) = delete; // expected-note {{candidate function has been explicitly deleted}}
>
> struct WithDel {
> - WithDel() = delete; // expected-note {{function has been explicitly marked deleted here}}
> - void fn() = delete; // expected-note {{function has been explicitly marked deleted here}}
> - operator int() = delete; // expected-note {{function has been explicitly marked deleted here}}
> + WithDel() = delete; // expected-note {{'WithDel' has been explicitly marked deleted here}}
> + void fn() = delete; // expected-note {{'fn' has been explicitly marked deleted here}}
> + operator int() = delete; // expected-note {{'operator int' has been explicitly marked deleted here}}
> void operator +(int) = delete;
>
> int i = delete; // expected-error {{only functions can have deleted definitions}}
>
> Modified: cfe/trunk/test/SemaCXX/for-range-dereference.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/for-range-dereference.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/for-range-dereference.cpp (original)
> +++ cfe/trunk/test/SemaCXX/for-range-dereference.cpp Wed Dec 18 17:30:06 2013
> @@ -11,7 +11,7 @@ struct NoBegin {
>
> struct DeletedEnd : public T {
> Data *begin();
> - Data *end() = delete; //expected-note {{function has been explicitly marked deleted here}}
> + Data *end() = delete; //expected-note {{'end' has been explicitly marked deleted here}}
> };
>
> struct DeletedADLBegin { };
>
> Modified: cfe/trunk/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp (original)
> +++ cfe/trunk/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp Wed Dec 18 17:30:06 2013
> @@ -1,7 +1,7 @@
> // RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi microsoft -std=c++11 -verify %s
>
> struct S {
> - virtual ~S() = delete; // expected-note {{function has been explicitly marked deleted here}}
> + virtual ~S() = delete; // expected-note {{'~S' has been explicitly marked deleted here}}
> void operator delete(void*, int);
> void operator delete(void*, double);
> } s; // expected-error {{attempt to use a deleted function}}
>
> Modified: cfe/trunk/test/SemaCXX/rval-references-examples.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/rval-references-examples.cpp?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/rval-references-examples.cpp (original)
> +++ cfe/trunk/test/SemaCXX/rval-references-examples.cpp Wed Dec 18 17:30:06 2013
> @@ -4,7 +4,7 @@ template<typename T>
> class unique_ptr {
> T *ptr;
>
> - unique_ptr(const unique_ptr&) = delete; // expected-note 3{{function has been explicitly marked deleted here}}
> + unique_ptr(const unique_ptr&) = delete; // expected-note 3{{'unique_ptr' has been explicitly marked deleted here}}
> unique_ptr &operator=(const unique_ptr&) = delete; // expected-note{{candidate function has been explicitly deleted}}
> public:
> unique_ptr() : ptr(0) { }
>
> Modified: cfe/trunk/test/SemaObjC/arc-unavailable-system-function.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/arc-unavailable-system-function.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/arc-unavailable-system-function.m (original)
> +++ cfe/trunk/test/SemaObjC/arc-unavailable-system-function.m Wed Dec 18 17:30:06 2013
> @@ -3,7 +3,7 @@
>
> # 1 "<command line>"
> # 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3
> -id * foo(); // expected-note {{function has been explicitly marked unavailable here}}
> +id * foo(); // expected-note {{'foo' has been explicitly marked unavailable here}}
>
> # 1 "arc-unavailable-system-function.m" 2
> void ret() {
>
> Modified: cfe/trunk/test/SemaObjC/attr-availability.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/attr-availability.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/attr-availability.m (original)
> +++ cfe/trunk/test/SemaObjC/attr-availability.m Wed Dec 18 17:30:06 2013
> @@ -1,11 +1,11 @@
> // RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -fsyntax-only -verify %s
>
> @protocol P
> -- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{method 'proto_method' declared here}}
> +- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{'proto_method' has been explicitly marked deprecated here}}
> @end
>
> @interface A <P>
> -- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{method 'method' declared here}}
> +- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{'method' has been explicitly marked deprecated here}}
>
> - (void)overridden __attribute__((availability(macosx,introduced=10.3))); // expected-note{{overridden method is here}}
> - (void)overridden2 __attribute__((availability(macosx,introduced=10.3)));
> @@ -37,7 +37,7 @@ void f(A *a, B *b) {
> // using a deprecated method when that method is re-implemented in a
> // subclass where the redeclared method is not deprecated.
> @interface C
> -- (void) method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{method 'method' declared here}}
> +- (void) method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{'method' has been explicitly marked deprecated here}}
> @end
>
> @interface D : C
>
> Modified: cfe/trunk/test/SemaObjC/attr-deprecated.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/attr-deprecated.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/attr-deprecated.m (original)
> +++ cfe/trunk/test/SemaObjC/attr-deprecated.m Wed Dec 18 17:30:06 2013
> @@ -2,10 +2,10 @@
> // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
>
> @interface A {
> - int X __attribute__((deprecated)); // expected-note 2 {{declared here}}
> + int X __attribute__((deprecated)); // expected-note 2 {{'X' has been explicitly marked deprecated here}}
> }
> -+ (void)F __attribute__((deprecated)); // expected-note 2 {{declared here}}
> -- (void)f __attribute__((deprecated)); // expected-note 4 {{declared here}}
> ++ (void)F __attribute__((deprecated)); // expected-note 2 {{'F' has been explicitly marked deprecated here}}
> +- (void)f __attribute__((deprecated)); // expected-note 4 {{'f' has been explicitly marked deprecated here}}
> @end
>
> @implementation A
> @@ -43,7 +43,7 @@
> @end
>
> @protocol P
> -- (void)p __attribute__((deprecated)); // expected-note {{declared here}}
> +- (void)p __attribute__((deprecated)); // expected-note {{'p' has been explicitly marked deprecated here}}
> @end
>
> void t1(A *a)
> @@ -72,7 +72,7 @@ void t4(Class c)
>
> @interface Bar
>
> - at property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); // expected-note 2 {{declared here}}
> + at property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); // expected-note 2 {{'FooBar' has been explicitly marked deprecated here}}
> - (void) MySetter : (int) value;
> @end
>
> @@ -84,7 +84,7 @@ int t5() {
>
>
> __attribute ((deprecated))
> - at interface DEPRECATED { // expected-note 2 {{declared here}}
> + at interface DEPRECATED { // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}}
> @public int ivar;
> DEPRECATED *ivar2; // no warning.
> }
> @@ -108,8 +108,8 @@ __attribute ((deprecated))
>
>
> @interface Test2
> - at property int test2 __attribute__((deprecated)); // expected-note 4 {{declared here}} \
> - // expected-note 2 {{property 'test2' is declared deprecated here}}
> + at property int test2 __attribute__((deprecated)); // expected-note 2 {{property 'test2' is declared deprecated here}} expected-note 3 {{'test2' has been explicitly marked deprecated here}} \
> + // expected-note {{'setTest2:' has been explicitly marked deprecated here}}
> @end
>
> void test(Test2 *foo) {
> @@ -127,7 +127,7 @@ __attribute__((deprecated))
>
> typedef struct {
> int x;
> -} footype __attribute((deprecated)); // expected-note 2 {{declared here}}
> +} footype __attribute((deprecated)); // expected-note 2 {{'footype' has been explicitly marked deprecated here}}
>
> @interface foo {
> footype a; // expected-warning {{'footype' is deprecated}}
> @@ -142,7 +142,7 @@ typedef struct {
> +(void)cmeth;
> @end
>
> -typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'DeprI' declared here}}
> +typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'DeprI' has been explicitly marked deprecated here}}
>
> @interface SI : DeprI // expected-warning {{'DeprI' is deprecated: blah}}
> -(DeprI*)meth; // expected-warning {{'DeprI' is deprecated: blah}}
>
> Modified: cfe/trunk/test/SemaObjC/class-unavail-warning.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/class-unavail-warning.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/class-unavail-warning.m (original)
> +++ cfe/trunk/test/SemaObjC/class-unavail-warning.m Wed Dec 18 17:30:06 2013
> @@ -2,7 +2,7 @@
> // rdar://9092208
>
> __attribute__((unavailable("not available")))
> - at interface MyClass { // expected-note 8 {{declaration has been explicitly marked unavailable here}}
> + at interface MyClass { // expected-note 8 {{'MyClass' has been explicitly marked unavailable here}}
> @public
> void *_test;
> MyClass *ivar; // no error.
>
> Modified: cfe/trunk/test/SemaObjC/property-deprecated-warning.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-deprecated-warning.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/property-deprecated-warning.m (original)
> +++ cfe/trunk/test/SemaObjC/property-deprecated-warning.m Wed Dec 18 17:30:06 2013
> @@ -5,7 +5,7 @@
> typedef signed char BOOL;
>
> @protocol P
> - at property(nonatomic,assign) id ptarget __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'ptarget' is declared deprecated here}} expected-note {{method 'ptarget' declared here}}
> + at property(nonatomic,assign) id ptarget __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'ptarget' is declared deprecated here}} expected-note {{'ptarget' has been explicitly marked deprecated here}}
> @end
>
> @protocol P1<P>
> @@ -14,7 +14,7 @@ typedef signed char BOOL;
>
>
> @interface UITableViewCell<P1>
> - at property(nonatomic,assign) id target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'target' is declared deprecated here}} expected-note {{method 'setTarget:' declared here}}
> + at property(nonatomic,assign) id target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'target' is declared deprecated here}} expected-note {{'setTarget:' has been explicitly marked deprecated here}}
> @end
>
> @interface PSTableCell : UITableViewCell
> @@ -22,9 +22,9 @@ typedef signed char BOOL;
> @end
>
> @interface UITableViewCell(UIDeprecated)
> - at property(nonatomic,assign) id dep_target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note 2 {{method 'dep_target' declared here}} \
> + at property(nonatomic,assign) id dep_target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note 2 {{'dep_target' has been explicitly marked deprecated here}} \
> // expected-note 4 {{property 'dep_target' is declared deprecated here}} \
> - // expected-note 2 {{method 'setDep_target:' declared here}}
> + // expected-note 2 {{'setDep_target:' has been explicitly marked deprecated here}}
> @end
>
> @implementation PSTableCell
> @@ -55,9 +55,9 @@ typedef signed char BOOL;
>
>
> @interface CustomAccessorNames
> - at property(getter=isEnabled,assign) BOOL enabled __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{method 'isEnabled' declared here}} expected-note {{property 'enabled' is declared deprecated here}}
> + at property(getter=isEnabled,assign) BOOL enabled __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'isEnabled' has been explicitly marked deprecated here}} expected-note {{property 'enabled' is declared deprecated here}}
>
> - at property(setter=setNewDelegate:,assign) id delegate __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{method 'setNewDelegate:' declared here}} expected-note {{property 'delegate' is declared deprecated here}}
> + at property(setter=setNewDelegate:,assign) id delegate __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'setNewDelegate:' has been explicitly marked deprecated here}} expected-note {{property 'delegate' is declared deprecated here}}
> @end
>
> void testCustomAccessorNames(CustomAccessorNames *obj) {
>
> Modified: cfe/trunk/test/SemaObjC/property-noninherited-availability-attr.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/property-noninherited-availability-attr.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/property-noninherited-availability-attr.m (original)
> +++ cfe/trunk/test/SemaObjC/property-noninherited-availability-attr.m Wed Dec 18 17:30:06 2013
> @@ -5,13 +5,12 @@
>
> @interface NSObject @end
> @protocol myProtocol
> - at property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{method 'myProtocolProperty' declared here}} \
> + at property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{'myProtocolProperty' has been explicitly marked deprecated here}} \
> // expected-note {{property 'myProtocolProperty' is declared deprecated here}}
> @end
>
> @interface Foo : NSObject
> - at property int myProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{'myProperty' declared here}} \
> - // expected-note {{method 'myProperty' declared here}} \
> + at property int myProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note 2 {{'myProperty' has been explicitly marked deprecated here}} \
> // expected-note {{property 'myProperty' is declared deprecated here}}
> @end
>
>
> Modified: cfe/trunk/test/SemaObjC/protocol-attribute.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/protocol-attribute.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/protocol-attribute.m (original)
> +++ cfe/trunk/test/SemaObjC/protocol-attribute.m Wed Dec 18 17:30:06 2013
> @@ -6,7 +6,7 @@ __attribute ((unavailable))
> Class <FwProto> cFw = 0; // expected-error {{'FwProto' is unavailable}}
>
>
> -__attribute ((deprecated)) @protocol MyProto1 // expected-note 7 {{declared here}}
> +__attribute ((deprecated)) @protocol MyProto1 // expected-note 7 {{'MyProto1' has been explicitly marked deprecated here}}
> @end
>
> @protocol Proto2 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
>
> Modified: cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m (original)
> +++ cfe/trunk/test/SemaObjC/special-dep-unavail-warning.m Wed Dec 18 17:30:06 2013
> @@ -4,30 +4,30 @@
> @interface B
> - (void) depInA;
> - (void) unavailMeth __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
> -- (void) depInA1 __attribute__((deprecated));
> +- (void) depInA1 __attribute__((deprecated)); // expected-note {{'depInA1' has been explicitly marked deprecated here}}
> - (void) unavailMeth1;
> -- (void) depInA2 __attribute__((deprecated));
> +- (void) depInA2 __attribute__((deprecated)); // expected-note {{'depInA2' has been explicitly marked deprecated here}}
> - (void) unavailMeth2 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
> - (void) depunavailInA;
> - (void) depunavailInA1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
> -- (void)FuzzyMeth __attribute__((deprecated));
> +- (void)FuzzyMeth __attribute__((deprecated)); // expected-note {{'FuzzyMeth' has been explicitly marked deprecated here}}
> - (void)FuzzyMeth1 __attribute__((unavailable));
> @end
>
> @interface A
> - (void) unavailMeth1 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
> -- (void) depInA __attribute__((deprecated));
> +- (void) depInA __attribute__((deprecated)); // expected-note {{'depInA' has been explicitly marked deprecated here}}
> - (void) depInA2 __attribute__((deprecated));
> - (void) depInA1;
> - (void) unavailMeth2 __attribute__((unavailable));
> - (void) depunavailInA __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
> - (void) depunavailInA1;
> - (void)FuzzyMeth __attribute__((unavailable));
> -- (void)FuzzyMeth1 __attribute__((deprecated));
> +- (void)FuzzyMeth1 __attribute__((deprecated)); // expected-note {{'FuzzyMeth1' has been explicitly marked deprecated here}}
> @end
>
>
> - at class C; // expected-note 5 {{forward declaration of class here}}
> + at class C; // expected-note 10 {{forward declaration of class here}}
>
> void test(C *c) {
> [c depInA]; // expected-warning {{'depInA' maybe deprecated because receiver type is unknown}}
> @@ -45,7 +45,7 @@ void test(C *c) {
>
> // rdar://10268422
> __attribute ((deprecated))
> - at interface DEPRECATED // expected-note {{declared here}}
> + at interface DEPRECATED // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}}
> +(id)new;
> @end
>
>
> Modified: cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m (original)
> +++ cfe/trunk/test/SemaObjC/warn-deprecated-implementations.m Wed Dec 18 17:30:06 2013
> @@ -29,7 +29,7 @@
> @end
>
> __attribute__((deprecated))
> - at interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{declared here}}
> + at interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{'CL' has been explicitly marked deprecated here}}
> @end
>
> @implementation CL // expected-warning {{Implementing deprecated class}}
>
> Modified: cfe/trunk/test/SemaObjC/warn-forward-class-attr-deprecated.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-forward-class-attr-deprecated.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/warn-forward-class-attr-deprecated.m (original)
> +++ cfe/trunk/test/SemaObjC/warn-forward-class-attr-deprecated.m Wed Dec 18 17:30:06 2013
> @@ -4,7 +4,7 @@
> @class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}}
>
> @interface I1
> -- (id) filenames __attribute__((deprecated));
> +- (id) filenames __attribute__((deprecated)); // expected-note {{'filenames' has been explicitly marked deprecated here}}
> @end
>
> @interface I2
>
> Modified: cfe/trunk/test/SemaObjC/warn-protocol-method-deprecated.m
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/warn-protocol-method-deprecated.m?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/warn-protocol-method-deprecated.m (original)
> +++ cfe/trunk/test/SemaObjC/warn-protocol-method-deprecated.m Wed Dec 18 17:30:06 2013
> @@ -3,7 +3,7 @@
>
> @protocol TestProtocol
> - (void)newProtocolMethod;
> -- (void)deprecatedProtocolMethod __attribute__((deprecated)); // expected-note 2 {{method 'deprecatedProtocolMethod' declared here}}
> +- (void)deprecatedProtocolMethod __attribute__((deprecated)); // expected-note 2 {{'deprecatedProtocolMethod' has been explicitly marked deprecated here}}
> @end
>
> @interface NSObject @end
> @@ -11,7 +11,7 @@
> @interface TestClass : NSObject <TestProtocol>
>
> - (void)newInstanceMethod;
> -- (void)deprecatedInstanceMethod __attribute__((deprecated)); // expected-note {{method 'deprecatedInstanceMethod' declared here}}
> +- (void)deprecatedInstanceMethod __attribute__((deprecated)); // expected-note {{'deprecatedInstanceMethod' has been explicitly marked deprecated here}}
>
> @end
>
>
> Modified: cfe/trunk/test/SemaObjCXX/arc-system-header.mm
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-system-header.mm?rev=197627&r1=197626&r2=197627&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaObjCXX/arc-system-header.mm (original)
> +++ cfe/trunk/test/SemaObjCXX/arc-system-header.mm Wed Dec 18 17:30:06 2013
> @@ -6,4 +6,4 @@ void f(A* a) {
> a->data.void_ptr = 0;
> a->data.a_b.b = 0; // expected-error{{'a_b' is unavailable: this system field has retaining ownership}}
> }
> -// expected-note at arc-system-header.h:10{{declaration has been explicitly marked unavailable here}}
> +// expected-note at arc-system-header.h:10{{'a_b' has been explicitly marked unavailable here}}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
~Aaron
More information about the cfe-commits
mailing list