]> granicus.if.org Git - clang/commitdiff
Use getTrueExpr/getFalseExpr as suggested by Doug.
authorAnders Carlsson <andersca@mac.com>
Tue, 15 Sep 2009 16:03:44 +0000 (16:03 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 15 Sep 2009 16:03:44 +0000 (16:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81863 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 7835523062a7167a09e1e9607fa8e7e0535f8f42..4b5173ffb2682a025d6de1eebc74a1103ff41f37 100644 (file)
@@ -5064,8 +5064,8 @@ QualType Sema::CheckAddressOfOperand(Expr *op, SourceLocation OpLoc) {
     return QualType();
   } else if (ConditionalOperator *CO = dyn_cast<ConditionalOperator>(op)) {
     // FIXME: Can LHS ever be null here?
-    if (!CheckAddressOfOperand(CO->getLHS(), OpLoc).isNull())
-      return CheckAddressOfOperand(CO->getRHS(), OpLoc);
+    if (!CheckAddressOfOperand(CO->getTrueExpr(), OpLoc).isNull())
+      return CheckAddressOfOperand(CO->getFalseExpr(), OpLoc);
   } else if (dcl) { // C99 6.5.3.2p1
     // We have an lvalue with a decl. Make sure the decl is not declared
     // with the register storage-class specifier.