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
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;
;
do ;
while(NULL_COND(true));
+ int *ip = NULL;
+ int (*fp)() = NULL;
+ struct foo {
+ int n;
+ void func();
+ };
+ int foo::*datamem = NULL;
+ int (foo::*funmem)() = NULL;
}
namespace test4 {