[cfe-commits] r67456 - /cfe/trunk/lib/AST/Expr.cpp

Chris Lattner sabre at nondot.org
Sat Mar 21 17:10:22 PDT 2009


Author: lattner
Date: Sat Mar 21 19:10:22 2009
New Revision: 67456

URL: http://llvm.org/viewvc/llvm-project?rev=67456&view=rev
Log:
fix some warnings in release-assert mode.

Modified:
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=67456&r1=67455&r2=67456&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Sat Mar 21 19:10:22 2009
@@ -103,15 +103,15 @@
 UnaryOperator::Opcode 
 UnaryOperator::getOverloadedOpcode(OverloadedOperatorKind OO, bool Postfix) {
   switch (OO) {
-  case OO_PlusPlus: return Postfix? PostInc : PreInc;
-  case OO_MinusMinus: return Postfix? PostDec : PreDec;
-  case OO_Amp: return AddrOf;
-  case OO_Star: return Deref;
-  case OO_Plus: return Plus;
-  case OO_Minus: return Minus;
-  case OO_Tilde: return Not;
-  case OO_Exclaim: return LNot;
   default: assert(false && "No unary operator for overloaded function");
+  case OO_PlusPlus:   return Postfix ? PostInc : PreInc;
+  case OO_MinusMinus: return Postfix ? PostDec : PreDec;
+  case OO_Amp:        return AddrOf;
+  case OO_Star:       return Deref;
+  case OO_Plus:       return Plus;
+  case OO_Minus:      return Minus;
+  case OO_Tilde:      return Not;
+  case OO_Exclaim:    return LNot;
   }
 }
 
@@ -269,6 +269,7 @@
 BinaryOperator::Opcode 
 BinaryOperator::getOverloadedOpcode(OverloadedOperatorKind OO) {
   switch (OO) {
+  default: assert(false && "Not an overloadable binary operator");
   case OO_Plus: return Add;
   case OO_Minus: return Sub;
   case OO_Star: return Mul;
@@ -300,7 +301,6 @@
   case OO_PipePipe: return LOr;
   case OO_Comma: return Comma;
   case OO_ArrowStar: return PtrMemI;
-  default: assert(false && "Not an overloadable binary operator");
   }
 }
 





More information about the cfe-commits mailing list