]> granicus.if.org Git - clang/commitdiff
Teach GetBaseType() about BlockPointerTypes.
authorTed Kremenek <kremenek@apple.com>
Thu, 11 Oct 2012 20:58:14 +0000 (20:58 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 11 Oct 2012 20:58:14 +0000 (20:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165742 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp

index 56fc8e19c4f4e31c13dd77b78f551e1e1b862256..6cd04584076a02f61130085f301dc02d90956f9e 100644 (file)
@@ -105,6 +105,8 @@ static QualType GetBaseType(QualType T) {
       break;
     else if (const PointerType* PTy = BaseType->getAs<PointerType>())
       BaseType = PTy->getPointeeType();
+    else if (const BlockPointerType *BPy = BaseType->getAs<BlockPointerType>())
+      BaseType = BPy->getPointeeType();
     else if (const ArrayType* ATy = dyn_cast<ArrayType>(BaseType))
       BaseType = ATy->getElementType();
     else if (const FunctionType* FTy = BaseType->getAs<FunctionType>())