Richard Smith <[email protected]> writes:
>> Don't return false from VisitCallExpr without emitting a diagnostic (see the
>> comment at the top of the file) -- replace the
>>
>>   if (!Val)
>>     return false;
>>
>> with
>>
>>   if (!Val)
>>     return Error(E);
>>
>> Otherwise LGTM, thanks!
>
> Committed with that tweak as r183886.

Thanks. I don't fully understand the difference between returning false
and calling Error here, based on the previous expression and the
comments at the top of the file. Is it simply that the attempt to const
fold an int here will have already emitted an appropriate diagnostic, so
we only need to do more when we have local logic?

On a related note, what diagnostic does Error without parameters emit
here? How is it different from the "not a compile time constant" error
we get from simply returning false?

Sorry if these questions are obvious.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to