From 926572303e34c40a056a91df288734592ac03033 Mon Sep 17 00:00:00 2001 From: Martin Bohme Date: Wed, 22 Mar 2017 13:34:37 +0000 Subject: Revert "Correct class-template deprecation behavior" This reverts commit r298410 (which produces incorrect warnings, see comments on https://reviews.llvm.org/rL298410). llvm-svn: 298504 --- clang/lib/Sema/SemaDeclAttr.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaDeclAttr.cpp') diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index b3dc71987f8..1c350a7e38b 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -6723,7 +6723,6 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, // Diagnostics for deprecated or unavailable. unsigned diag, diag_message, diag_fwdclass_message; unsigned diag_available_here = diag::note_availability_specified_here; - SourceLocation NoteLocation = D->getLocation(); // Matches 'diag::note_property_attribute' options. unsigned property_note_select; @@ -6746,8 +6745,6 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, diag_fwdclass_message = diag::warn_deprecated_fwdclass_message; property_note_select = /* deprecated */ 0; available_here_select_kind = /* deprecated */ 2; - if (auto *attr = D->getAttr()) - NoteLocation = attr->getLocation(); break; case AR_Unavailable: @@ -6866,7 +6863,7 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, } } else - S.Diag(NoteLocation, diag_available_here) + S.Diag(D->getLocation(), diag_available_here) << D << available_here_select_kind; if (K == AR_NotYetIntroduced) -- cgit v1.2.3