[cfe-commits] r120617 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/Sema/SemaDecl.cpp
jahanian
fjahanian at apple.com
Mon Dec 6 09:31:16 PST 2010
On Dec 6, 2010, at 8:50 AM, Douglas Gregor wrote:
>
> On Dec 1, 2010, at 2:29 PM, Fariborz Jahanian wrote:
>
>>
>>
>> +/// \brief Get the copy initialization expression of VarDecl,or NULL if
>> +/// none exists.
>> +Expr *ASTContext::getBlockVarCopyInits(VarDecl*VD) {
>> + llvm::DenseMap<VarDecl*, Expr*>::iterator
>> + I = BlockVarCopyInits.find(VD);
>> + return (I != BlockVarCopyInits.end()) ? cast<Expr>(I->second) : 0;
>> +}
>> +
>> +/// \brief Set the copy inialization expression of a block var decl.
>> +void ASTContext::setBlockVarCopyInits(VarDecl*VD, Expr* Init) {
>> + assert(VD && Init && "Passed null params");
>> + BlockVarCopyInits[VD] = Init;
>> +}
>
> For these routines, how about assert()'d hasAttr<BlockAttr>()?
Done in r121007.
- fariborz
>
> - Doug
More information about the cfe-commits
mailing list