[cfe-commits] r52166 - /cfe/trunk/include/clang/AST/Expr.h

Eli Friedman eli.friedman at gmail.com
Mon Jun 9 22:00:14 PDT 2008


Author: efriedma
Date: Tue Jun 10 00:00:13 2008
New Revision: 52166

URL: http://llvm.org/viewvc/llvm-project?rev=52166&view=rev
Log:
Fix getTrueExpr for ConditionalOperator to actually work.  No testcase 
because it's currently unused.


Modified:
    cfe/trunk/include/clang/AST/Expr.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=52166&r1=52165&r2=52166&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Tue Jun 10 00:00:13 2008
@@ -972,7 +972,7 @@
   //  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 ?:





More information about the cfe-commits mailing list