[cfe-commits] r65609 - /cfe/trunk/lib/AST/Expr.cpp

Chris Lattner clattner at apple.com
Thu Feb 26 20:42:14 PST 2009


testcase?

On Feb 26, 2009, at 7:16 PM, Mike Stump wrote:

> Author: mrs
> Date: Thu Feb 26 21:16:57 2009
> New Revision: 65609
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65609&view=rev
> Log:
> The middle operand in ?: is optional, really.
>
> Modified:
>    cfe/trunk/lib/AST/Expr.cpp
>
> Modified: cfe/trunk/lib/AST/Expr.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=65609&r1=65608&r2=65609&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/AST/Expr.cpp (original)
> +++ cfe/trunk/lib/AST/Expr.cpp Thu Feb 26 21:16:57 2009
> @@ -334,7 +334,7 @@
>     // The condition must be evaluated, but if either the LHS or RHS  
> is a
>     // warning, warn about them.
>     const ConditionalOperator *Exp = cast<ConditionalOperator>(this);
> -    if (Exp->getLHS()->isUnusedResultAWarning(Loc, R1, R2))
> +    if (Exp->getLHS() && Exp->getLHS()->isUnusedResultAWarning(Loc,  
> R1, R2))
>       return true;
>     return Exp->getRHS()->isUnusedResultAWarning(Loc, R1, R2);
>   }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list