[llvm-commits] [llvm] r59890 - /llvm/trunk/include/llvm/Support/Casting.h

Török Edwin edwintorok at gmail.com
Sun Nov 23 01:21:42 PST 2008


On 2008-11-23 11:02, Duncan Sands wrote:
> Hi Scott,
>
>   
>> Check for NULL before traversing the isa<> type hierarchy checking with a
>> NULL-based reference.
>>     
>
> I'm not sure this is a good idea.  Passing NULL to isa<>
> sounds like a bug to me.  Before you would notice it, but
> now I fear bugs will be hidden.
>
>   

How about adding an assert, instead of testing for Val != 0?

Best regards,
--Edwin



More information about the llvm-commits mailing list