]> granicus.if.org Git - clang/commitdiff
Fix getTrueExpr for ConditionalOperator to actually work. No testcase
authorEli Friedman <eli.friedman@gmail.com>
Tue, 10 Jun 2008 05:00:13 +0000 (05:00 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 10 Jun 2008 05:00:13 +0000 (05:00 +0000)
because it's currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52166 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index 42344d0feac6bb28f11f7d967afb0b09d6c3b751..0314a66a1d3d01165cb05f41049eb39e0cae9ed7 100644 (file)
@@ -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 ?: