diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-06-21 18:51:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-06-21 18:51:10 +0000 |
commit | 28a5f0cdfcc927a94c1bda6a225200762df22411 (patch) | |
tree | c9ce84abcb3bdb592e17d37b55e29f8c8cb6a44a /lib/Sema/SemaChecking.cpp | |
parent | 56242baaae6c45b24fbdd5bc56fe4ee516fa9e6b (diff) |
PR13165: False positive when initializing member data pointers with NULL.
This now correctly covers, I believe, all the pointer types:
* 'any' pointers (both function and data normal pointers and ObjC object pointers)
* member pointers (both function and data)
* block pointers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index fe5e8aca3d..ef7dc8819f 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -4432,8 +4432,7 @@ void CheckImplicitConversion(Sema &S, Expr *E, QualType T, if ((E->isNullPointerConstant(S.Context, Expr::NPC_ValueDependentIsNotNull) == Expr::NPCK_GNUNull) && !Target->isAnyPointerType() - && !Target->isBlockPointerType() && !Target->isFunctionPointerType() - && !Target->isMemberFunctionPointerType()) { + && !Target->isBlockPointerType() && !Target->isMemberPointerType()) { SourceLocation Loc = E->getSourceRange().getBegin(); if (Loc.isMacroID()) Loc = S.SourceMgr.getImmediateExpansionRange(Loc).first; |