r175374 - Use the correct type to hold enumeration values

Dmitri Gribenko gribozavr at gmail.com
Sat Feb 16 12:03:26 PST 2013


Author: gribozavr
Date: Sat Feb 16 14:03:26 2013
New Revision: 175374

URL: http://llvm.org/viewvc/llvm-project?rev=175374&view=rev
Log:
Use the correct type to hold enumeration values

Modified:
    cfe/trunk/lib/Format/TokenAnnotator.cpp

Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnnotator.cpp?rev=175374&r1=175373&r2=175374&view=diff
==============================================================================
--- cfe/trunk/lib/Format/TokenAnnotator.cpp (original)
+++ cfe/trunk/lib/Format/TokenAnnotator.cpp Sat Feb 16 14:03:26 2013
@@ -711,7 +711,7 @@ public:
   ExpressionParser(AnnotatedLine &Line) : Current(&Line.First) {}
 
   /// \brief Parse expressions with the given operatore precedence.
-  void parse(int Precedence = prec::Unknown) {
+  void parse(prec::Level Precedence = prec::Unknown) {
     if (Precedence > prec::PointerToMember || Current == NULL)
       return;
 
@@ -729,7 +729,7 @@ public:
 
     while (Current != NULL) {
       // Consume operators with higher precedence.
-      parse(Precedence + 1);
+      parse(prec::Level(Precedence + 1));
 
       // At the end of the line or when an operator with higher precedence is
       // found, insert fake parenthesis and return.





More information about the cfe-commits mailing list