diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-02-12 19:20:48 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-02-12 19:20:48 +0000 |
commit | 468e399cfa371a0b698e566d89ffa786b9696f94 (patch) | |
tree | 2af92c7ec47933bcf467ebf4e28c0cf80833c3c0 | |
parent | 9c504e93c1b34d9ac7e4175ab1269b76f2460877 (diff) |
Fixing the MSVC compiler warning a different way; removed use of static_cast and instead used a signed integer parameter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174996 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Format/TokenAnnotator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp index 1e59561076..5794f5ab5d 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) |