Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp	(revision 175473)
+++ lib/Format/Format.cpp	(working copy)
@@ -399,15 +399,15 @@
       if (Other.Column != Column)
         return Other.Column > Column;
       if (Other.VariablePos != VariablePos)
-        return Other.VariablePos < VariablePos;
+        return Other.VariablePos > VariablePos;
       if (Other.LineContainsContinuedForLoopSection !=
           LineContainsContinuedForLoopSection)
         return LineContainsContinuedForLoopSection;
       if (Other.ParenLevel != ParenLevel)
-        return Other.ParenLevel < ParenLevel;
-      if (Other.StartOfLineLevel < StartOfLineLevel)
-        return Other.StartOfLineLevel < StartOfLineLevel;
-      return Other.Stack < Stack;
+        return Other.ParenLevel > ParenLevel;
+      if (Other.StartOfLineLevel != StartOfLineLevel)
+        return Other.StartOfLineLevel > StartOfLineLevel;
+      return Other.Stack > Stack;
     }
   };
 
