My code was wrong too.  Can you review r90552?

On Dec 3, 2009, at 10:54 PM, Zhongxing Xu wrote:

> You're right. I reverted it.
> 
> 2009/12/4 Ted Kremenek <[email protected]>:
>> Hi Zhongxing,
>> 
>> I don't think this is correct.  Here 'state' is the argument to 
>> addTransition(), which shadows the 'state' in the Checker object (which is 
>> used by getState()).  The argument to addTransition() should probably be 
>> renamed to make this clearer.
>> 
>> Ted
>> 
>> On Dec 3, 2009, at 10:36 PM, Zhongxing Xu wrote:
>> 
>>> Author: zhongxingxu
>>> Date: Fri Dec  4 00:36:49 2009
>>> New Revision: 90546
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=90546&view=rev
>>> Log:
>>> the assertion says state is not NULL. When state is not NULL, getState()
>>> returns state. So simplify the predicate.
>>> 
>>> Modified:
>>>    cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h
>>> 
>>> Modified: cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h
>>> URL: 
>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h?rev=90546&r1=90545&r2=90546&view=diff
>>> 
>>> ==============================================================================
>>> --- cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h (original)
>>> +++ cfe/trunk/include/clang/Analysis/PathSensitive/Checker.h Fri Dec  4 
>>> 00:36:49 2009
>>> @@ -126,8 +126,7 @@
>>> 
>>>   void addTransition(const GRState *state) {
>>>     assert(state);
>>> -    if (state != getState() ||
>>> -        (state && state != B.GetState(Pred)))
>>> +    if (state != B.GetState(Pred))
>>>       GenerateNode(state, true);
>>>     else
>>>       Dst.Add(Pred);
>>> 
>>> 
>>> _______________________________________________
>>> cfe-commits mailing list
>>> [email protected]
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>> 
>> 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to