]> granicus.if.org Git - clang/commitdiff
Avoid a signed/unsigned comparison warning with compilers that don't know how
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 24 Sep 2013 22:13:21 +0000 (22:13 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 24 Sep 2013 22:13:21 +0000 (22:13 +0000)
to handle constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191336 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Lexer.cpp

index d8a5160e95d50eee1f6c7cadf4136a64d0b91470..52565694a8f093ae5c8c9edfde0cdd90f6ebd3ce 100644 (file)
@@ -1643,7 +1643,7 @@ const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr,
       // In C++1y, we need to look ahead a few characters to see if this is a
       // valid suffix for a string literal or a numeric literal (this could be
       // the 'operator""if' defining a numeric literal operator).
-      const int MaxStandardSuffixLength = 3;
+      const unsigned MaxStandardSuffixLength = 3;
       char Buffer[MaxStandardSuffixLength] = { C };
       unsigned Consumed = Size;
       unsigned Chars = 1;