On Sun, Nov 16, 2008 at 11:28 AM, Nuno Lopes <[EMAIL PROTECTED]> wrote:
> Author: nlopes
> Date: Sun Nov 16 13:28:31 2008
> New Revision: 59421
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59421&view=rev
> Log:
> make IntExprEvaluator fold the ?: operator
Nice.
> +bool IntExprEvaluator::VisitConditionalOperator(const ConditionalOperator
> *E) {
> + llvm::APSInt Cond(32);
> + if (!EvaluateInteger(E->getCond(), Cond, Info))
> + return false;
This should really be using HandleConversionToBool; the condition
isn't guaranteed to be an integer.
-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits