[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. @alexfh, do you still have any objections? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. > Why not just use clang-tidy-diff.py? The clang-tidy-diff.py script has a > distinct and somewhat self-documenting name and a very specific purpose (find > clang-tidy regressions in a patch), while run-clang-tidy.py is more focused > on running over larger bodies

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-04-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-31 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 193023. zinovy.nis added a comment. Herald added a subscriber: jdoerfert. Added a test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 Files: clang-tidy/tool/run-clang-tidy.py

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-29 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D59449#1446839 , @thakis wrote: > Can we delete clang-tidy-diff.py with this? (Or delete most of its contents > and make it forward to this script?) I don't mind deleting clang-tidy-diff.py, but someone may want to use it

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-27 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL357114: [clang-tidy] Handle missing yaml module in run-clang-tidy.py (authored by zinovy.nis, committed by ). Herald

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-25 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 192137. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59734/new/ https://reviews.llvm.org/D59734 Files: clang-tidy/tool/run-clang-tidy.py test/clang-tidy/run-clang-tidy.cpp Index: test/clang-tidy/run-clang-tidy.cpp

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-25 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/tool/run-clang-tidy.py:210 +help='Create a yaml file to store suggested fixes in, ' +'which can be applied with

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-23 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: test/clang-tidy/run-clang-tidy.cpp:1 +// RUN: %run_clang_tidy --help // RUN: rm -rf %t Just check that python doesn't complain on the script code and imported modules.

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-23 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 191992. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59734/new/ https://reviews.llvm.org/D59734 Files: clang-tidy/tool/run-clang-tidy.py test/clang-tidy/run-clang-tidy.cpp Index: test/clang-tidy/run-clang-tidy.cpp

[PATCH] D59734: [clang-tidy] Handle missing yaml module in run-clang-tidy.py

2019-03-23 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, bkramer, kuhar. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. The Yaml module is missing on some

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-20 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE356547: [clang-tidy] Parallelize clang-tidy-diff.py (authored by zinovy.nis, committed by ). Changed prior to commit: https://reviews.llvm.org/D57662?vs=189562=191474#toc Repository: rCTE Clang

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D59449#1435032 , @alexfh wrote: > How is this functionality different from the clang-tidy-diff.py script with > the -j option being added in the other patch? It's the same. Repository: rCTE Clang Tools Extra CHANGES

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any comments? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59449/new/ https://reviews.llvm.org/D59449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. One more gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59449: [clang-tidy] Integrate clang-tidy-diff.py machinery into run-clang-tidy.py

2019-03-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, bkramer. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. This patch adds a new `--diff[=2]` option to

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57662: [clang-tidy] Parallelize clang-tidy-diff.py

2019-03-06 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 189562. zinovy.nis added a comment. - honest '--export-fixes': multiple yamls are merged into the resulting one. - minor cosmetic fixes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 Files:

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/tool/clang-tidy-diff.py:133 +if args.export_fixes: + print("error: -export-fixes and -j are mutually exclusive.") + sys.exit(1) alexfh wrote: >

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 187421. zinovy.nis added a comment. - `-j` is `1` by default; - fixed minor remarks; CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 Files: clang-tidy/tool/clang-tidy-diff.py Index:

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-15 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/tool/clang-tidy-diff.py:98 + parser.add_argument('-j', type=int, default=0, + help='number of tidy instances to be run in parallel.')

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-14 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/tool/clang-tidy-diff.py:76 +t = threading.Thread(target=tidy_caller, args=(task_queue, lock, timeout)) +t.daemon = True +t.start() JonasToth wrote:

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-13 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Any comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 186514. zinovy.nis added a comment. `-j` and `-export-fixes` were made mutually exclusive. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 Files: clang-tidy/tool/clang-tidy-diff.py Index:

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. > I only say this because I think I might have seen it happen when I was > running `run-clang-tidy.py` over a large code base with a fairly aggressive > check/fixit, but frankly I was too new to LLVM to know it wasn't something I > might have done wrong. A bit

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In D57662#1392509 , @MyDeveloperDay wrote: > Just a question.. If clang tidy is running with -fix in parallel, what stops > each clang-tidy invocation altering a common header at the same time? You are right. May be it

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-04 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 185087. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 Files: clang-tidy/tool/clang-tidy-diff.py Index: clang-tidy/tool/clang-tidy-diff.py

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-04 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 185085. zinovy.nis added a comment. Fixed minor typos. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57662/new/ https://reviews.llvm.org/D57662 Files: clang-tidy/tool/clang-tidy-diff.py Index: clang-tidy/tool/clang-tidy-diff.py

[PATCH] D57662: [clang-tidy] Parallelise clang-tidy-diff.py

2019-02-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, ehsan. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. This patch has 2 rationales: - large patches

[PATCH] D53194: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344343: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK (authored by zinovy.nis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D53194: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: ymandel, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. In https://reviews.llvm.org/D52971#1262200, @ymandel wrote: > Hi, > > It looks like this change has disabled FileCheck

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D52971#1262200, @ymandel wrote: > Hi, > > It looks like this change has disabled FileCheck for all clang-tidy lit tests > that don't use check-prefixes. So, they all trivially pass even if their > CHECK... lines are wrong. An easy repro

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: test/clang-tidy/misc-non-private-member-variables-in-classes.cpp:1 +// RUN: %check_clang_tidy -check-suffix=NONPRIVATE %s misc-non-private-member-variables-in-classes %t +// RUN: %check_clang_tidy -check-suffix=NONPRIVATE %s

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-08 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344015: [clang-tidy] The patch extends the existing command line option -check-suffix (authored by zinovy.nis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D52971#1257702, @JonasToth wrote: > I think it would make sense to migrate one test already, to use the new > capability This change was inspired by Roman Lebedev (lebedev.ri), so we expect him to provide us with such a test soon ;-)

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 168690. zinovy.nis added a comment. - Fixed diagnostics; - Interchangeable alias introduced: `-check-suffixes` for `-check-suffix`. https://reviews.llvm.org/D52971 Files: test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D52971#1257705, @alexfh wrote: > Looks good with a comment. It can break the compatibility. May be it worth to add an alias "-check-suffixes" for this option? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52971

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D52971#1257702, @JonasToth wrote: > The change looks good in principle. I think it would make sense to migrate > one test already, to use the new capability and check if everything works as > expected. The current tests still run fine?

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: test/clang-tidy/check_clang_tidy.py:94-95 +for check in args.check_suffix: + if not re.match('^[A-Z0-9\-,]+$', check): +sys.exit('Only A..Z, 0..9, "," and "-" are ' + +

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 168609. zinovy.nis added a comment. Removed "," from the list of allowed suffix characters. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52971 Files: test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py Index:

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D45776#1253944, @lebedev.ri wrote: > >> Did this intentionally omit the possibility to pass a group of prefixes, > >> like `FileCheck` supports? > >> Usefulness of this feature is somewhat penalized by this. Done. Please review this

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-07 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: lebedev.ri, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. The patch extends the existing command line option `-check_suffix` to accept multiple comma-separated prefixes. //

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D45776#1251256, @lebedev.ri wrote: > Did this intentionally omit the possibility to pass a group of prefixes, like > `FileCheck` supports? > Usefulness of this feature is somewhat penalized by this. I did not fully realize what do you

[PATCH] D50852: [clang-tidy] abseil-auto-make-unique

2018-08-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/abseil/AutoMakeUniqueCheck.cpp:21 +void AutoMakeUniqueCheck::registerMatchers(MatchFinder* finder) { + if (!getLangOpts().CPlusPlus) return; + JonasToth wrote: > Please clang-format, `return` on next

[PATCH] D50852: [clang-tidy] abseil-auto-make-unique

2018-08-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D50852#1202774, @lebedev.ri wrote: > 1. Please always upload all patches with full context. > 2. There already is `modernize-use-auto`. Does it handle this case? Then this > should be just an alias to that check. Else, i think it would be

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-06-15 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE334829: [clang-tidy] This patch is a fix for D45405 where spaces were mistakenly… (authored by zinovy.nis, committed by ). Changed prior to commit:

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); zinovy.nis wrote: > malcolm.parsons

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:198 E = E->ignoreParenBaseCasts(); + if (const auto *EC = dyn_cast(E)) +E = EC->getSubExpr(); malcolm.parsons wrote: >

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-22 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333003: [clang-tidy] SimplifyBoolenExpr doesnt add parens if unary negotiation is of… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-21 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 147836. zinovy.nis edited the summary of this revision. zinovy.nis added a comment. - More accurate place to fix. https://reviews.llvm.org/D47122 Files: clang-tidy/readability/SimplifyBooleanExprCheck.cpp

[PATCH] D47122: [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is of ExprWithCleanups type

2018-05-20 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: alexfh, aaron.ballman. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. using A = std::string; bool foo(A ) { A S; if (GetValue(s) && S != (A)s) return false; return

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added a comment. Alexander, can you please have a look at the latest patch? Thanks. https://reviews.llvm.org/D45927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-16 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: modernize/UseAutoCheck.cpp:40 +? Alpha +: (std::isspace(C) || (!RemoveStars && C == '*')) ? Space + :

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-14 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 146677. zinovy.nis added a comment. - Fix for templated type names. Thanks AlexanderK for pointing. https://reviews.llvm.org/D45927 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/clang-tidy/checks/modernize-use-auto.rst

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-06 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +// CHECK-FIXES-0-5: auto li = {{.*}} +// CHECK-FIXES-1-0: auto li = {{.*}} +

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-06 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +// CHECK-FIXES-0-5: auto li = {{.*}} +// CHECK-FIXES-1-0: auto li = {{.*}} +

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-05 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +// CHECK-FIXES-0-5: auto li = {{.*}} +// CHECK-FIXES-1-0: auto li = {{.*}} +

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331474: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Thanks Alexander for your feedback! https://reviews.llvm.org/D46325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 145059. zinovy.nis added a comment. - Added comments on why setting `ProgramAction` explicitly. https://reviews.llvm.org/D46325 Files: clang-tidy/ClangTidy.cpp test/clang-tidy/clang-tidy-__clang_analyzer__macro.cpp Index:

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. https://reviews.llvm.org/rCTE331297 https://reviews.llvm.org/D45932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis closed this revision. zinovy.nis added a comment. Fixed in git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@331297 91177308-0d34-0410-b5e6-96231b3b80d8 https://reviews.llvm.org/D45932 ___ cfe-commits mailing list

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:44 +char const *const MultibyteSnowman("\xE2\x98\x83"); +// CHECK-FIXES: {{^}}char const *const MultibyteSnowman("\xE2\x98\x83");{{$}}

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: george.karpenkov, alexfh, hokein. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, a.sidorin, xazax.hun. This macro is widely used in many well-known projects, ex. Chromium. But it's not set for

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:111 + // Upper ASCII are disallowed too. + for (unsigned char C = 0xFFu; C >= 0x80u; --C) +DisallowedChars.set(C); LegalizeAdulthood wrote: > Why does this loop go

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 144727. zinovy.nis added a comment. - Applied Alexander's changes. https://reviews.llvm.org/D45927 Files: clang-tidy/checks/modernize-use-auto.rst clang-tidy/modernize-use-auto-min-type-name-length.cpp modernize/UseAutoCheck.cpp Index:

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-01 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. https://reviews.llvm.org/D45932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-04-30 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. > I think, it's 13, if you choose to remove stars, and 17 otherwise. The > difference is excessive spaces vs. required ones. Implementing proper logic > may be involved, but we can simplify it to something like "count all > non-space characters and a single space

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-04-30 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:33 + +bool IsNotSpace(const char& C) { + return !std::isspace(static_cast(C)); alexfh wrote: > Why `const char&` and not just `char`? Moreover, these two functions can be >

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-04-30 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Aaron, any comments for the new revision? https://reviews.llvm.org/D45932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-26 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 144066. zinovy.nis added a comment. - Optimized `containsEscapedCharacters` not to re-create `bitset` (implicitly in `StringRef::find_first_of`) for each literal. - Merged 2 passes for testing for allowed chars into a single one.

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:71 + // supported by specific code pages only. + if (Bytes.find_if_not(isASCII) != StringRef::npos) +return false; aaron.ballman wrote: > zinovy.nis wrote: > >

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:71 + // supported by specific code pages only. + if (Bytes.find_if_not(isASCII) != StringRef::npos) +return false; aaron.ballman wrote: > zinovy.nis wrote: > >

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:71 + // supported by specific code pages only. + if (Bytes.find_if_not(isASCII) != StringRef::npos) +return false; aaron.ballman wrote: > I am starting to think

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143679. zinovy.nis marked an inline comment as done. zinovy.nis added a comment. - Use clang::isASCII instead of home-brewed code. https://reviews.llvm.org/D45932 Files: clang-tidy/modernize/RawStringLiteralCheck.cpp

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis marked an inline comment as done. zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:70-72 + if (Bytes.find_if([](char C) { +return static_cast(C) > 0x7Fu; + }) != StringRef::npos) aaron.ballman

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:42 char const *const HexNonPrintable("\\\x03"); char const *const Delete("\\\177"); +char const *const MultibyteSnowman("\xE2\x98\x83"); By the way, AFAIK the lines

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: xazax.hun, LegalizeAdulthood. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, rnkovacs. It's useless and not safe to replace `"\xE2\x98\x83"` with `"☃"` (snowman) Especially there's an explicit

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-04-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a subscriber: malcolm.parsons. zinovy.nis added a comment. > I think spaces that will be removed should be counted - long long is 9. I thought about it, but what about "long long int - * * *"? Is it still 9? I think it's a business of clang-format to

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-04-22 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: malcolm.parsons, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. This patch is a fix for https://reviews.llvm.org/D45405 where spaces were also considered as a part of a type

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-21 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330511: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py (authored by zinovy.nis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45160: [clang-apply-replacements] Make clang-apply-replacements installable

2018-04-21 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330509: [clang-apply-replacements] Make clang-apply-replacements installable (authored by zinovy.nis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-21 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143436. zinovy.nis marked 3 inline comments as done. zinovy.nis added a comment. - Applied the changes suggested by Alexander. https://reviews.llvm.org/D45776 Files: docs/clang-tidy/index.rst test/clang-tidy/check_clang_tidy.cpp

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-20 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143384. zinovy.nis edited the summary of this revision. zinovy.nis added a comment. - Minor cosmetic fixes. https://reviews.llvm.org/D45776 Files: docs/clang-tidy/index.rst test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: test/clang-tidy/check_clang_tidy.py:77 + + check_fixes_prefix = 'CHECK-FIXES' + args.check_suffix + check_messages_prefix = 'CHECK-MESSAGES' + args.check_suffix alexfh wrote: > Maybe the script should add a dash

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Done. https://reviews.llvm.org/D45776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143053. zinovy.nis added a comment. - Removed exec attribute on file. https://reviews.llvm.org/D45776 Files: docs/clang-tidy/index.rst test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py Index:

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143052. zinovy.nis added a comment. - Updated docs. https://reviews.llvm.org/D45776 Files: docs/clang-tidy/index.rst test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py Index: test/clang-tidy/check_clang_tidy.py

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-19 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 143050. zinovy.nis marked 4 inline comments as done. zinovy.nis added a comment. - Fixed issues pointed by Alexander. https://reviews.llvm.org/D45776 Files: test/clang-tidy/check_clang_tidy.cpp test/clang-tidy/check_clang_tidy.py Index:

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-04-18 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. The patch introduces a new command line option `-check_suffix` to allow multiple %check_clang_tidy% in tests. Sample: // RUN: %check_clang_tidy %s

[PATCH] D45160: [clang-apply-replacements] Make clang-apply-replacements installable

2018-04-13 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Gentle ping. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-11 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. The build was broken by someone else's commit then. From my side there was a warning only I fixed immediately. ср, 11 апр. 2018 г. в 16:26, Alexander Kornienko via Phabricator < revi...@reviews.llvm.org>: > alexfh added a comment. > > In

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-10 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a subscriber: angelgarcia. zinovy.nis added a comment. Roman, I see you've fixed them. Thanks a lot! I did not face with these errors on MSVS'201 so had no chance to fix early. ср, 11 апр. 2018 г. в 0:02, Roman Lebedev via Phabricator < revi...@reviews.llvm.org>: > lebedev.ri

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-10 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329730: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 141719. zinovy.nis marked 9 inline comments as done. zinovy.nis added a comment. - Default value is **5**. - Switched to 'tooling::fixit::getText'. - Updated rst docs. https://reviews.llvm.org/D45405 Files: clang-tidy/modernize/UseAutoCheck.cpp

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} alexfh wrote: > alexfh

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-09 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:290 +: ClangTidyCheck(Name, Context), RemoveStars(Options.get("RemoveStars", 0)), + MinTypeNameLength(Options.get("MinTypeNameLength", 0)) {} lebedev.ri wrote: >

[PATCH] D45405: [clang-tidy] [modernize-use-auto] Add a threshold for minimal type name length to be replaced with 'auto'

2018-04-08 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 141561. zinovy.nis added a comment. - Updated ReleaseNotes. https://reviews.llvm.org/D45405 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst

<    1   2   3   >