[cfe-commits] r79995 - /cfe/trunk/include/clang/AST/Stmt.h
Fariborz Jahanian
fjahanian at apple.com
Tue Aug 25 11:03:57 PDT 2009
On Aug 25, 2009, at 10:59 AM, John McCall wrote:
> Douglas Gregor wrote:
>> Author: dgregor
>> Date: Tue Aug 25 10:47:45 2009
>> New Revision: 79995
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=79995&view=rev
>> Log:
>> Sanity checking for statement reference counts. Thanks for the
>> suggestion, Fariborz
>>
>> Modified:
>> cfe/trunk/include/clang/AST/Stmt.h
>>
>> Modified: cfe/trunk/include/clang/AST/Stmt.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Stmt.h?rev=79995&r1=79994&r2=79995&view=diff
>>
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- cfe/trunk/include/clang/AST/Stmt.h (original)
>> +++ cfe/trunk/include/clang/AST/Stmt.h Tue Aug 25 10:47:45 2009
>> @@ -174,6 +174,7 @@
>>
>> /// \brief Destroy the current statement and its children.
>> void Destroy(ASTContext &Ctx) {
>> + assert(RefCount >= 0);'
Should be assert(RefCount >= 1);
- fj
>>
>> if (--RefCount == 0)
>> DoDestroy(Ctx);
>> }
> class Stmt {
> ...
> unsigned RefCount : 24;
>
> John.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list