diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-06-14 22:56:51 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-06-14 22:56:51 +0000 |
commit | 84862f6a0bdaad6f0648e10dfab6058cfa512864 (patch) | |
tree | 2ab0f4eb489cf34e0c6a83bdb517e371af567795 /lib/Analysis/FormatString.cpp | |
parent | 997e15cfdc5c78cf3cd9c520dd1bcf3eef4750c0 (diff) |
[format strings] correctly suggest correct type for '%@' specifiers. Fixes <rdar://problem/9607158>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index c1b5ea8a65..be214e0d86 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -300,7 +300,8 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { argTy->isNullPtrType(); case ObjCPointerTy: - return argTy->getAs<ObjCObjectPointerType>() != NULL; + return argTy->getAs<ObjCObjectPointerType>() != NULL || + argTy->getAs<BlockPointerType>() != NULL; } // FIXME: Should be unreachable, but Clang is currently emitting |