[cfe-commits] r78862 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Aug 12 16:49:36 PDT 2009
On Wed, Aug 12, 2009 at 4:36 PM, Ryan Flynn<pizza at parseerror.com> wrote:
> --- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Aug 12 18:36:28 2009
> @@ -437,7 +437,7 @@
> return;
> }
>
> - if (FunctionDecl *FD = dyn_cast<FunctionDecl>(d)) {
> + if (FunctionDecl *FD = cast<FunctionDecl>(d)) {
> if (!FD->getResultType()->isPointerType()) {
> S.Diag(Attr.getLoc(), diag::warn_attribute_malloc_pointer_only);
> return;
Is there actually any guarantee the decl in question is a function decl?
-Eli
More information about the cfe-commits
mailing list