diff options
author | Anders Carlsson <andersca@mac.com> | 2010-11-06 14:58:53 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-11-06 14:58:53 +0000 |
commit | 624259984448cf19f4e94b7e31c7c32e99a39ea5 (patch) | |
tree | 12f9febba2166cfda43eb7b69e251abc23f9de1a /lib/Analysis/FormatString.cpp | |
parent | 3030eb82593097502469a8b3fc26112c79c75605 (diff) |
Don't warn when matching %p to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index 388b9d34a2..c1b5ea8a65 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -296,8 +296,8 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { } case CPointerTy: - return argTy->getAs<PointerType>() != NULL || - argTy->getAs<ObjCObjectPointerType>() != NULL; + return argTy->isPointerType() || argTy->isObjCObjectPointerType() || + argTy->isNullPtrType(); case ObjCPointerTy: return argTy->getAs<ObjCObjectPointerType>() != NULL; |