[cfe-commits] r78876 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Ryan Flynn
pizza at parseerror.com
Wed Aug 12 18:19:23 PDT 2009
Author: pizza
Date: Wed Aug 12 20:19:23 2009
New Revision: 78876
URL: http://llvm.org/viewvc/llvm-project?rev=78876&view=rev
Log:
change cast to dyn_cast because d may not be a FunctionDecl
Modified:
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=78876&r1=78875&r2=78876&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Aug 12 20:19:23 2009
@@ -437,7 +437,7 @@
return;
}
- if (FunctionDecl *FD = cast<FunctionDecl>(d)) {
+ if (FunctionDecl *FD = dyn_cast<FunctionDecl>(d)) {
if (!FD->getResultType()->isPointerType()) {
S.Diag(Attr.getLoc(), diag::warn_attribute_malloc_pointer_only);
return;
More information about the cfe-commits
mailing list