]> granicus.if.org Git - clang/commitdiff
Removed some superfluous code. The getType() method and associated
authorSteve Naroff <snaroff@apple.com>
Fri, 13 Jul 2007 17:39:21 +0000 (17:39 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 13 Jul 2007 17:39:21 +0000 (17:39 +0000)
assert is now done in UsualUnaryConversions().

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

Sema/SemaExpr.cpp

index 5b65f2a40c36c66b36896c555c21f65cb0b203de..ce672209c41f7c72f10f2177938cd2b7b265bc94 100644 (file)
@@ -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