]> granicus.if.org Git - clang/commitdiff
Fixed isFunctionPointerType to correctly handle typedefs.
authorTed Kremenek <kremenek@apple.com>
Mon, 10 Sep 2007 22:54:34 +0000 (22:54 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 10 Sep 2007 22:54:34 +0000 (22:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41814 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h

index 0a851693c616b9f898eb0d16846b8287546f88ea..9c853e321b293b94c472c9d1b93ea69064b79b74 100644 (file)
@@ -870,7 +870,7 @@ inline bool Type::isPointerType() const {
   return isa<PointerType>(CanonicalType);
 }
 inline bool Type::isFunctionPointerType() const {
-  if (const PointerType* T = dyn_cast<PointerType>(this))
+  if (const PointerType* T = getAsPointerType())
     return T->getPointeeType()->isFunctionType();
   else
     return false;