[cfe-commits] RangeConstraintManager

Ted Kremenek kremenek at apple.com
Fri Feb 13 10:58:47 PST 2009


On Feb 13, 2009, at 9:01 AM, Ben Laurie wrote:

>>>
>>>
>>> static const llvm::APSInt Max(const llvm::APSInt &v) {
>>>   return llvm::APSInt::getMaxValue(v.getBitWidth(), v.isUnsigned());
>>> }
>>> static const llvm::APSInt Min(const llvm::APSInt &v) {
>>>    return llvm::APSInt::getMinValue(v.getBitWidth(),  
>>> v.isUnsigned());
>>> }
>>> static const llvm::APSInt One(const llvm::APSInt &v) {
>>>   return llvm::APSInt(llvm::APInt(v.getBitWidth(), 1),  
>>> v.isUnsigned());
>>> }
>>
>> I suppose these methods could be declared as const.
>
> They are static!

Oops, you're right!

>
>
>> Actually, it might be
>> worth just putting these into APSInt directly.  It seems like  
>> something that
>> other people could use.
>
> OK.

Yeah, just making these (non-static) methods of APSInt would be really  
useful.




More information about the cfe-commits mailing list