[cfe-commits] r42452 - in /cfe/trunk: AST/Expr.cpp Lex/IdentifierTable.cpp Parse/ParseObjc.cpp Sema/Sema.h Sema/SemaDecl.cpp Sema/SemaExpr.cpp clang.xcodeproj/project.pbxproj include/clang/AST/ASTContext.h include/clang/AST/Decl.h include/clang/AST/Expr.h include/clang/Lex/IdentifierTable.h include/clang/Lex/Preprocessor.h include/clang/Parse/Action.h include/clang/Parse/Parser.h

Ted Kremenek kremenek at apple.com
Fri Sep 28 16:26:17 PDT 2007


Never mind.  I think I interpreted this code incorrectly.  It looks  
fine to me.

On Sep 28, 2007, at 4:23 PM, Ted Kremenek wrote:

>
> On Sep 28, 2007, at 3:22 PM, Steve Naroff wrote:
>
>> +  IdentifierInfo *getAsIdentifierInfo() const {
>> +    if (InfoPtr & ArgFlags)
>> +      return reinterpret_cast<IdentifierInfo *>(InfoPtr &  
>> ~ArgFlags);
>> +    return 0;
>> +  }
>> +  MultiKeywordSelector *getAsMultiKeywordSelector() const {
>> +    if (InfoPtr & ArgFlags)
>> +      return 0;
>> +    return reinterpret_cast<MultiKeywordSelector *>(InfoPtr);
>> +  }
>
> Steve,
>
> There looks like there are two bugs here to me.  I think you need:
>
> InfoPtr & ZeroArg  (for the getAsIdentifierInfo() case)
>
> and
>
> InfoPtr & OneArg (for the getAsMultiKeywordSelector() case)




More information about the cfe-commits mailing list