[cfe-commits] r39818 - /cfe/trunk/Sema/SemaExpr.cpp
Steve Naroff
snaroff at apple.com
Fri Jul 13 10:39:21 PDT 2007
Author: snaroff
Date: Fri Jul 13 12:39:21 2007
New Revision: 39818
URL: http://llvm.org/viewvc/llvm-project?rev=39818&view=rev
Log:
Removed some superfluous code. The getType() method and associated
assert is now done in UsualUnaryConversions().
Modified:
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=39818&r1=39817&r2=39818&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Fri Jul 13 12:39:21 2007
@@ -483,17 +483,9 @@
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
More information about the cfe-commits
mailing list