[cfe-commits] r58306 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/AST/ExprCXX.h include/clang/AST/StmtNodes.def include/clang/Analysis/PathSensitive/GRExprEngine.h lib/AST/Expr.cpp lib/Analysis/GRExprEngine.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaExprCXX.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Oct 28 04:44:19 PDT 2008
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
More information about the cfe-commits
mailing list