diff options
author | Martin Bohme <mboehme@google.com> | 2017-03-22 13:34:37 +0000 |
---|---|---|
committer | Martin Bohme <mboehme@google.com> | 2017-03-22 13:34:37 +0000 |
commit | 926572303e34c40a056a91df288734592ac03033 (patch) | |
tree | 39a1c907cadf0e7a981831ed1813cd0995bc4476 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | b41979640f96d48231f45f6075a37ec78a6fd0fd (diff) | |
download | bcm5719-llvm-926572303e34c40a056a91df288734592ac03033.tar.gz bcm5719-llvm-926572303e34c40a056a91df288734592ac03033.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<DeprecatedAttr>()) - 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) |