From: Steve Naroff Date: Fri, 13 Jul 2007 17:39:21 +0000 (+0000) Subject: Removed some superfluous code. The getType() method and associated X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba61c14bc9f37c2ae035b6d6e9f0ce37cde0ada4;p=clang Removed some superfluous code. The getType() method and associated assert is now done in UsualUnaryConversions(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39818 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Sema/SemaExpr.cpp b/Sema/SemaExpr.cpp index 5b65f2a40c..ce672209c4 100644 --- a/Sema/SemaExpr.cpp +++ b/Sema/SemaExpr.cpp @@ -483,17 +483,9 @@ ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty, inline QualType Sema::CheckConditionalOperands( // C99 6.5.15 Expr *&cond, Expr *&lex, Expr *&rex, SourceLocation questionLoc) { - QualType condT = cond->getType(); - QualType lexT = lex->getType(); - QualType rexT = rex->getType(); - - assert(!condT.isNull() && "ParseConditionalOp(): no conditional type"); - assert(!lexT.isNull() && "ParseConditionalOp(): no lhs type"); - assert(!rexT.isNull() && "ParseConditionalOp(): no rhs type"); - - condT = UsualUnaryConversions(cond); - lexT = UsualUnaryConversions(lex); - rexT = UsualUnaryConversions(rex); + QualType condT = UsualUnaryConversions(cond); + QualType lexT = UsualUnaryConversions(lex); + QualType rexT = UsualUnaryConversions(rex); // first, check the condition. if (!condT->isScalarType()) { // C99 6.5.15p2