On Sun, 12 Jul 2009 23:00:39 -0700, Chris Lattner <[email protected]> wrote: > On Jul 10, 2009, at 4:35 PM, Steve Naroff wrote: >> Author: snaroff >> Date: Fri Jul 10 18:34:53 2009 >> New Revision: 75314 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=75314&view=rev >> Log: >> This patch includes a conceptually simple, but very intrusive/ >> pervasive change. > > Yay, thanks for working on this. Does this add support for Class<x> > and friends? If so, please add testcases. > > >> +++ cfe/trunk/lib/AST/ExprConstant.cpp Fri Jul 10 18:34:53 2009 >> @@ -382,7 +382,8 @@ >> const Expr* SubExpr = E->getSubExpr(); >> >> // Check for pointer->pointer cast >> - if (SubExpr->getType()->isPointerType()) { >> + if (SubExpr->getType()->isPointerType() || >> + SubExpr->getType()->isObjCObjectPointerType()) { > > Would it make sense to add a "isAnyPointerType()" method to do both > these checks? >
Unless the predicate also returns true for pointer-to-member, I hope for a different name. Otherwise, things could get confusing, as there are two or three places in the C++ code where a "isNormalOrMemberPointer" function might be useful. Sebastian _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
