From 3fd50319d3c41ec78e11cfe6acab090de5accf1e Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 6 Nov 2010 14:58:53 +0000 Subject: Don't warn when matching %p to nullptr. llvm-svn: 118344 --- clang/lib/Analysis/FormatString.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Analysis/FormatString.cpp') diff --git a/clang/lib/Analysis/FormatString.cpp b/clang/lib/Analysis/FormatString.cpp index 388b9d34a23..c1b5ea8a652 100644 --- a/clang/lib/Analysis/FormatString.cpp +++ b/clang/lib/Analysis/FormatString.cpp @@ -296,8 +296,8 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { } case CPointerTy: - return argTy->getAs() != NULL || - argTy->getAs() != NULL; + return argTy->isPointerType() || argTy->isObjCObjectPointerType() || + argTy->isNullPtrType(); case ObjCPointerTy: return argTy->getAs() != NULL; -- cgit v1.2.3