diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 1e59561076244993c4879893e284e093ee2edb51..5794f5ab5d4cc09e6a22b8f7fbfbb783537906c4 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -705,7 +705,7 @@ public:
   ExpressionParser(AnnotatedLine &Line) : Current(&Line.First) {}
 
   /// \brief Parse expressions with the given operatore precedence.
-  void parse(unsigned Precedence = prec::Unknown) {
+  void parse(signed Precedence = prec::Unknown) {
     if (Precedence > prec::PointerToMember || Current == NULL)
       return;
 
@@ -729,7 +729,7 @@ public:
       // found, insert fake parenthesis and return.
       if (Current == NULL || Current->is(tok::semi) || closesScope(*Current) ||
           ((Current->Type == TT_BinaryOperator || Current->is(tok::comma)) &&
-           getPrecedence(*Current) < static_cast<prec::Level>(Precedence))) {
+           getPrecedence(*Current) < Precedence)) {
         if (OperatorFound) {
           ++Start->FakeLParens;
           if (Current != NULL)