Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Roman Lebedev via cfe-commits
On Thu, Apr 12, 2018 at 10:47 PM, Zinovy Nis via cfe-commits wrote: > I composed a test and you are right - for multi-token type names new code > returns wrong result. So this new code was a premature optimization. Sorry. > I'll see how to fix it in a better way and

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Zinovy Nis via cfe-commits
I composed a test and you are right - for multi-token type names new code returns wrong result. So this new code was a premature optimization. Sorry. I'll see how to fix it in a better way and create a review on it. Thanks for poiting. чт, 12 апр. 2018 г. в 20:01, Alexander Kornienko

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Alexander Kornienko via cfe-commits
On Thu, Apr 12, 2018 at 7:44 AM Zinovy Nis via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: zinovy.nis > Date: Wed Apr 11 22:41:24 2018 > New Revision: 329873 > > URL: http://llvm.org/viewvc/llvm-project?rev=329873=rev > Log: > [clang-tidy] [modernize-use-auto] Get only a length of

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Zinovy Nis via cfe-commits
Yes, a test that should fail, did not fail with old code. And it's a problem) чт, 12 апр. 2018 г. в 10:35, Roman Lebedev : > On Thu, Apr 12, 2018 at 10:30 AM, Zinovy Nis wrote: > > Yes, due to to incorrect token length returned by the old code, the

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Roman Lebedev via cfe-commits
On Thu, Apr 12, 2018 at 10:30 AM, Zinovy Nis wrote: > Yes, due to to incorrect token length returned by the old code, the test was > passing. I fixed it. Let me rephrase. If i revert just the clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp change, will the

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Zinovy Nis via cfe-commits
Yes, due to to incorrect token length returned by the old code, the test was passing. I fixed it. Hm, you are right, clangTooling is not requirted anymore. чт, 12 апр. 2018 г. в 10:25, Roman Lebedev : > Also, i guess you now can remove linking to clangTooling that was >

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Roman Lebedev via cfe-commits
Also, i guess you now can remove linking to clangTooling that was required to unbreak the build. I'm guessing clangLex contains Lexer::MeasureTokenLength() ? On Thu, Apr 12, 2018 at 10:22 AM, Roman Lebedev wrote: > Test? > > On Thu, Apr 12, 2018 at 8:41 AM, Zinovy Nis via

Re: [clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-12 Thread Roman Lebedev via cfe-commits
Test? On Thu, Apr 12, 2018 at 8:41 AM, Zinovy Nis via cfe-commits wrote: > Author: zinovy.nis > Date: Wed Apr 11 22:41:24 2018 > New Revision: 329873 > > URL: http://llvm.org/viewvc/llvm-project?rev=329873=rev > Log: > [clang-tidy] [modernize-use-auto] Get only a

[clang-tools-extra] r329873 - [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself

2018-04-11 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Wed Apr 11 22:41:24 2018 New Revision: 329873 URL: http://llvm.org/viewvc/llvm-project?rev=329873=rev Log: [clang-tidy] [modernize-use-auto] Get only a length of token, not the token itself Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseAutoCheck.cpp