summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 3ece5fce9c4..fd1b3e7a49d 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -407,8 +407,7 @@ static void HandleDestructorAttr(Decl *d, const AttributeList &Attr, Sema &S) {
priority = Idx.getZExtValue();
}
- FunctionDecl *Fn = dyn_cast<FunctionDecl>(d);
- if (!Fn) {
+ if (!isa<FunctionDecl>(d)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type,
"destructor", "function");
return;
OpenPOWER on IntegriCloud