'cast'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79041
91177308-0d34-0410-b5e6-
96231b3b80d8
return;
}
- if (!isFunction(d)) {
+ const FunctionDecl *FD = dyn_cast<FunctionDecl>(d);
+
+ if (!FD) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << 0 /*function*/;
return;
}
- const FunctionDecl *FD = cast<FunctionDecl>(d);
QualType RetTy = FD->getResultType();
if (!(RetTy->isAnyPointerType() || RetTy->isBlockPointerType())) {