Chris Lattner wrote:
> On Oct 27, 2008, at 5:22 PM, Douglas Gregor wrote:
>   
>> +  case CallExprClass: {
>> +    // C++ [expr.call]p10:
>> +    //   A function call is an lvalue if and only if the result type
>> +    //   is a reference.
>> +    QualType CalleeType
>> +      = dyn_cast<CallExpr>(this)->getCallee()->IgnoreParens()- 
>>     
>>> getType();
>>>       
>> +    if (const PointerType *FnTypePtr = CalleeType- 
>>     
>>> getAsPointerType())
>>>       
>
> Won't this crash if dyn_cast returns null?
In the CallExprClass case, the dyn_cast<CallExpr> cannot possibly return 
null.

But doesn't that mean it should be a cast<CallExpr>?

Sebastian

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

Reply via email to