summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-08-14 01:55:37 +0000
committerReid Kleckner <rnk@google.com>2018-08-14 01:55:37 +0000
commit11f9f8acdec0685d39099ea25ac2cb49f82003a9 (patch)
tree6e59af817088865427f48a1f3fa743e90dce77e5 /clang/lib/Sema/SemaDecl.cpp
parentc7816800d87f848907b1c86d6fc614ad03585c46 (diff)
downloadbcm5719-llvm-11f9f8acdec0685d39099ea25ac2cb49f82003a9.tar.gz
bcm5719-llvm-11f9f8acdec0685d39099ea25ac2cb49f82003a9.zip
Revert r339623 "Model type attributes as regular Attrs."
This breaks compiling atlwin.h in Chromium. I'm sure the code is invalid in some way, but we put a lot of work into accepting it, and I'm sure rejecting it was not an intended consequence of this refactoring. :) llvm-svn: 339638
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index e62728c124c..abdeba60be7 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -5999,14 +5999,14 @@ static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {
// The [[lifetimebound]] attribute can be applied to the implicit object
// parameter of a non-static member function (other than a ctor or dtor)
// by applying it to the function type.
- if (const auto *A = ATL.getAttrAs<LifetimeBoundAttr>()) {
+ if (ATL.getAttrKind() == AttributedType::attr_lifetimebound) {
const auto *MD = dyn_cast<CXXMethodDecl>(FD);
if (!MD || MD->isStatic()) {
- S.Diag(A->getLocation(), diag::err_lifetimebound_no_object_param)
- << !MD << A->getRange();
+ S.Diag(ATL.getAttrNameLoc(), diag::err_lifetimebound_no_object_param)
+ << !MD << ATL.getLocalSourceRange();
} else if (isa<CXXConstructorDecl>(MD) || isa<CXXDestructorDecl>(MD)) {
- S.Diag(A->getLocation(), diag::err_lifetimebound_ctor_dtor)
- << isa<CXXDestructorDecl>(MD) << A->getRange();
+ S.Diag(ATL.getAttrNameLoc(), diag::err_lifetimebound_ctor_dtor)
+ << isa<CXXDestructorDecl>(MD) << ATL.getLocalSourceRange();
}
}
}
OpenPOWER on IntegriCloud