[cfe-commits] r72304 - /cfe/trunk/include/clang/AST/Stmt.h

Sebastian Redl sebastian.redl at getdesigned.at
Sat May 23 06:49:33 PDT 2009


Fariborz Jahanian wrote:
> On May 22, 2009, at 5:22 PM, Ted Kremenek wrote:
>
>   
>> Author: kremenek
>> Date: Fri May 22 19:22:11 2009
>> New Revision: 72304
>>
>>
>>   inputs_iterator begin_inputs() {
>> -    return Exprs.empty() ? NULL : &Exprs[0] + NumOutputs;
>> +    return Exprs.data() + NumOutputs;
>>     
> It is magic. But how can these two be equivalent? How can it return a  
> NULL?
>   
It doesn't return NULL. But that doesn't matter. The two are equivalent
as long as begin_inputs() and end_inputs() return the same thing when
there are no inputs. It doesn't have to be NULL.

Sebastian



More information about the cfe-commits mailing list