From: Eli Friedman Date: Tue, 10 Jun 2008 05:00:13 +0000 (+0000) Subject: Fix getTrueExpr for ConditionalOperator to actually work. No testcase X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbdbbd7a7b728bf7734c992fe72b0e549d31a710;p=clang Fix getTrueExpr for ConditionalOperator to actually work. No testcase because it's currently unused. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 42344d0fea..0314a66a1d 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -972,7 +972,7 @@ public: // e.g: x ?: y is shorthand for x ? x : y, except that the expression "x" // is only evaluated once. Expr *getTrueExpr() const { - return SubExprs[LHS] ? SubExprs[COND] : SubExprs[LHS]; + return SubExprs[LHS] ? SubExprs[LHS] : SubExprs[COND]; } // getTrueExpr - Return the subexpression representing the value of the ?: