[cfe-commits] r75314 - in /cfe/trunk: include/clang/AST/ include/clang/Analysis/PathSensitive/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Frontend/ lib/Sema/ test/CodeGenObjC/ test/PCH/ test/SemaObjC/ test/SemaObjCXX/

Sebastian Redl sebastian.redl at getdesigned.at
Mon Jul 13 00:16:01 PDT 2009


On Sun, 12 Jul 2009 23:00:39 -0700, Chris Lattner <clattner at apple.com>
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



More information about the cfe-commits mailing list