r174986 - Removing a signed/unsigned mismatch warning triggered in MSVC 11.
Dmitri Gribenko
gribozavr at gmail.com
Tue Feb 12 10:52:29 PST 2013
On Tue, Feb 12, 2013 at 8:39 PM, Aaron Ballman <aaron at aaronballman.com> wrote:
> Author: aaronballman
> Date: Tue Feb 12 12:39:15 2013
> New Revision: 174986
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174986&view=rev
> Log:
> Removing a signed/unsigned mismatch warning triggered in MSVC 11.
>
> 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=174986&r1=174985&r2=174986&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Format/TokenAnnotator.cpp (original)
> +++ cfe/trunk/lib/Format/TokenAnnotator.cpp Tue Feb 12 12:39:15 2013
> @@ -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) < Precedence)) {
> + getPrecedence(*Current) < static_cast<prec::Level>(Precedence))) {
There is a better fix: just change the type of Precedence. Does it
work for MSVC?
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list