summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2018-08-21 17:50:10 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2018-08-21 17:50:10 +0000
commit63e7ab18e5e23bc3f5c72be47f07d5ebfef29167 (patch)
tree7c7a4c2dd7e2f3a6ab128492b7f2134450508979 /clang/lib/Sema/SemaDeclAttr.cpp
parent132fc5a8617f95388b756ab9893883b5ded89d22 (diff)
downloadbcm5719-llvm-63e7ab18e5e23bc3f5c72be47f07d5ebfef29167.tar.gz
bcm5719-llvm-63e7ab18e5e23bc3f5c72be47f07d5ebfef29167.zip
Address Aaron Ballman's post-commit review comments from r340306, NFC
llvm-svn: 340311
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp7
1 files changed, 3 insertions, 4 deletions
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<VarDecl>(D) || !cast<VarDecl>(D)->hasGlobalStorage()) {
+ if (!cast<VarDecl>(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<AlwaysDestroyAttr, NoDestroyAttr>(S, D, A);
- } else {
+ else
handleSimpleAttributeWithExclusions<NoDestroyAttr, AlwaysDestroyAttr>(S, D, A);
- }
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud