From 63e7ab18e5e23bc3f5c72be47f07d5ebfef29167 Mon Sep 17 00:00:00 2001 From: Erik Pilkington Date: Tue, 21 Aug 2018 17:50:10 +0000 Subject: Address Aaron Ballman's post-commit review comments from r340306, NFC llvm-svn: 340311 --- clang/lib/Sema/SemaDeclAttr.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'clang/lib/Sema/SemaDeclAttr.cpp') diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 27eb533360c..d72b8fbb1aa 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -5918,17 +5918,16 @@ static void handleOpenCLAccessAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } static void handleDestroyAttr(Sema &S, Decl *D, const ParsedAttr &A) { - if (!isa(D) || !cast(D)->hasGlobalStorage()) { + if (!cast(D)->hasGlobalStorage()) { S.Diag(D->getLocation(), diag::err_destroy_attr_on_non_static_var) << (A.getKind() == ParsedAttr::AT_AlwaysDestroy); return; } - if (A.getKind() == ParsedAttr::AT_AlwaysDestroy) { + if (A.getKind() == ParsedAttr::AT_AlwaysDestroy) handleSimpleAttributeWithExclusions(S, D, A); - } else { + else handleSimpleAttributeWithExclusions(S, D, A); - } } //===----------------------------------------------------------------------===// -- cgit v1.2.3