[PATCH] D82004: [clang-tidy][NFC] Remove the double look-up on IncludeInserter

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, gribozavr2, aaron.ballman, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Refactor out the double lookup in `IncludeInserter` when trying to get the `IncludeSorter` for a specified

[PATCH] D81975: [clangd] Add command line option for ClangTidyConfig

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Gotta say it's not hugely pressing. The reason for it is clangd lets you specify some checks to run but it doesn't let you specify the options for those checks. Effectively forcing each project to require a .clang-tidy configuration file if you want to use checks where

[PATCH] D82004: [clang-tidy][NFC] Remove the double look-up on IncludeInserter

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG08c83ed75752: [clang-tidy][NFC] Remove the double look-up on IncludeInserter (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D82004?vs=271334=271432#toc Repository: rG LLVM

[PATCH] D81953: [clang-tidy] warnings-as-error no longer exits with ErrorCount

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGccd127008aa2: [clang-tidy] warnings-as-error no longer exits with ErrorCount (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, Eugene.Zelenko, angelgarcia, aaron.ballman, klimek. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Enables support for transforming loops of the form for (auto I = Cont.rbegin(), E =

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LG, I have nothing else to add here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80753/new/ https://reviews.llvm.org/D80753 ___ cfe-commits mailing list

[PATCH] D82059: [clang-tidy] RenamerClangTidy group redecls into 1 warning.

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG850bb889a56c: [clang-tidy] RenamerClangTidy group redecls into 1 warning. (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D82059?vs=271509=271722#toc Repository: rG LLVM

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271723. njames93 marked 4 inline comments as done. njames93 added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/ https://reviews.llvm.org/D82089 Files:

[PATCH] D79477: [clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd9b8aada8288: [clang-tidy] Add --use-color command line option and UseColor option to control… (authored by hyd-dev, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D79477: [clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79477/new/ https://reviews.llvm.org/D79477 ___ cfe-commits mailing list

[PATCH] D82059: [clang-tidy] RenamerClangTidy group redecls into 1 warning.

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, jbcoe, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. This changes the behavious of `RenamerClangTidyCheck` based checks by grouping declarations of the same thing into

[PATCH] D82059: [clang-tidy] RenamerClangTidy group redecls into 1 warning.

2020-06-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271509. njames93 added a comment. New line... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82059/new/ https://reviews.llvm.org/D82059 Files: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp

[PATCH] D82162: [clang-tidy] RenamerClangTidy wont emit fixes in scratch space

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Prevent fixes being displayed if usages are found in the scratch buffer. See Fix-It hints are being generated in the

[PATCH] D81975: [clangd] Add command line option for ClangTidyConfig

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272009. njames93 added a comment. Small rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81975/new/ https://reviews.llvm.org/D81975 Files: clang-tools-extra/clangd/test/clang-tidy-config.test

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272034. njames93 added a comment. Add documentation about the include style optione Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/ https://reviews.llvm.org/D82089 Files:

[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272033. njames93 added a comment. - Updated Docs and set HandleReverseRanges default to false Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81923/new/ https://reviews.llvm.org/D81923 Files:

[PATCH] D81949: [clang-tidy] Extend InheritParentConfig to CommandLineConfig

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4836188ad9b3: [clang-tidy] Extend InheritParentConfig to CommandLineConfig (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D81949?vs=271134=272004#toc Repository: rG LLVM

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272030. njames93 added a comment. - Set and store the IncludeStyle Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/ https://reviews.llvm.org/D82089 Files:

[PATCH] D81975: [clangd] Add command line option for ClangTidyConfig

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 abandoned this revision. njames93 added a comment. Abandoned in favour of the proposed clangd-config . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81975/new/ https://reviews.llvm.org/D81975

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272470. njames93 added a comment. Fix checks failing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80202/new/ https://reviews.llvm.org/D80202 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp Index:

[PATCH] D81932: [clang-tidy] Improved accuracy of check list updater script

2020-06-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG23063296b539: [clang-tidy] Improved accuracy of check list updater script (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81932/new/

[PATCH] D80202: [ASTMatchers] Performance optimization for memoization

2020-06-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272433. njames93 added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80202/new/ https://reviews.llvm.org/D80202 Files: clang/lib/ASTMatchers/ASTMatchFinder.cpp Index:

[PATCH] D82162: [clang-tidy] RenamerClangTidy wont emit fixes in scratch space

2020-06-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6ae0f5f3e1d4: [clang-tidy] RenamerClangTidy wont emit fixes in scratch space (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82281: [clang-tidy] llvm-twine-local ignores parameters

2020-06-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a8b04114480: [clang-tidy] llvm-twine-local ignores parameters (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82281/new/

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272306. njames93 added a comment. Update doc comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82188/new/ https://reviews.llvm.org/D82188 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added subscribers: cfe-commits, arphaman, kbarton, xazax.hun, nemanjai. Herald added a project: clang. Following on from D77085 , I was never happy with the

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Herald added a subscriber: wuzish. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp:30 Options.store(Opts, "GslHeader", GslHeader);

[PATCH] D81769: [clang-tidy] Repair various issues with modernize-avoid-bind

2020-06-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp:243 + if ((std::distance(ME->child_begin(), ME->child_end()) == 1) && + isa(*ME->children().begin())) { +// reference to data member without explicit "this"

[PATCH] D82626: [CodeComplete] Tweak completion for else.

2020-06-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added a project: clang. Herald added a subscriber: cfe-commits. If an `if` statement uses braces for its `then` block, suggest braces for the `else` and `else if` completion blocks, Otherwise don't suggest

[PATCH] D82661: [clang-tidy][NFC} Remove unnecessary includes throughout clang-tidy header files

2020-06-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 273792. njames93 added a comment. Herald added subscribers: usaxena95, kadircet, jkorous. Fix some issues with tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82661/new/ https://reviews.llvm.org/D82661

[PATCH] D82706: [ASTMatchers] Enhanced support for matchers taking Regex arguments

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 273960. njames93 added a comment. Moved the code to build and verify the regex out of the macro Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82706/new/ https://reviews.llvm.org/D82706 Files:

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9306fd042ce: [clang-tidy] Reworked enum options handling(again) (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82188/new/

[PATCH] D82720: [clang-tidy] performance-faster-string-find string-view

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, sbenza, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Extend the default string like classes to include `std::basic_string_view`. Repository: rG LLVM Github Monorepo

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 273913. njames93 added a comment. Rebased inline with new enum handling added in D82188 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82188#2118885 , @thakis wrote: > It's the only change on the blame list, things pass consistently before the > change, and fail consistently after it. Do you happen to have a proper build log for the failing build. That

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I've relanded this with some sanity checks in 37cc4fa2eaa3d03ca8cd4947eb0d4c60e3c9b45c . If it fails again without those asserts I'll go back to the drawing board Repository: rG LLVM Github

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82188#2118769 , @thakis wrote: > This breaks chevk-clang-tools in mac: http://45.33.8.238/mac/16292/step_8.txt > > Please take a look and revert for now if it takes a while to fix. Are you sure that this is the offending

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82707#2118772 , @MyDeveloperDay wrote: > The net result is an actual reduction in the overall % > > F12256151: image.png Is that a bad thing? Repository: rG LLVM Github Monorepo

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGabafb655c85d: [clang][docs] Remove untracked files from formatted status (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82707/new/

[PATCH] D82706: [ASTMatchers] Enhanced support for matchers taking Regex arguments

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 273957. njames93 added a comment. Include matcher name in error message when failing to build a regex Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82706/new/ https://reviews.llvm.org/D82706 Files:

[PATCH] D82711: [clang-tidy] Fix hicpp-named-paramater

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, jbcoe. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Currently this alias instantiates the readability-identifier-naming check, just swap it out to use the readability-named-paramater

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp:31 + ~TestCheck() { +assert(DidRegister && "Check never registered"); +assert(DidFire && "Check never

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82707#2119303 , @MyDeveloperDay wrote: > In D82707#2118796 , @njames93 wrote: > > > Is that a bad thing? > > > Not really, just a little disappointed ;-( I'm gonna hazard a guess

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG740575dc232b: [clangd] Fix readability-else-after-return Adding a note without main… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271047. njames93 added a comment. Removed `isExpansionInMainFile` check as per original authors comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81336/new/ https://reviews.llvm.org/D81336 Files:

[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added subscribers: cfe-commits, mgrang, xazax.hun, mgorny. Herald added a project: clang. Flags and replaces calls to standard library algorithms that could be converted to use the `std::ranges`

[PATCH] D81932: [clang-tidy] Improved accuracy of check list updater script

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, Eugene.Zelenko. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. - Added a file `FixItHint` comments to Check files to for the script to mark those checks as offering fix-its when

[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseRangesCheck.cpp:77 + MatchCallTo((ID + "Begin").str(), namedDecl().bind(Range), +

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe1ba7241c3ef: [clang-tidy] simplify-bool-expr ignores template instantiations (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81949: [clang-tidy] Extend InheritParentConfig to CommandLineConfig

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: DmitryPolukhin, alexfh, gribozavr2, klimek, hokein, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Extend the `InheritParentConfig` support introduced in D75184

[PATCH] D81953: [clang-tidy] warnings-as-error no longer exits with ErrorCount

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, jroelofs, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. When using `-warnings-as-errors`, If there are any warnings promoted to errors, clang-tidy exits with the number of

[PATCH] D81953: [clang-tidy] warnings-as-error no longer exits with ErrorCount

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D81953#2096388 , @aaron.ballman wrote: > LGTM unless @jroelofs has a reason why the code was originally written that > way, but can you add test coverage for it? How would you suggest I add test coverage for this, afaik

[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271191. njames93 marked 4 inline comments as done. njames93 added a comment. Tweaked documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81923/new/ https://reviews.llvm.org/D81923 Files:

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaf4f2eb47636: [clang-tidy] remove duplicate fixes of alias checkers (authored by Daniel599, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82223: [clang-tidy] Implement storeOptions for checks missing it.

2020-06-19 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, Eugene.Zelenko. Herald added subscribers: cfe-commits, kbarton, xazax.hun, nemanjai. Herald added a project: clang. Just adds the storeOptions for Checks that weren't already storing their options. Repository: rG LLVM

[PATCH] D82281: [clang-tidy] llvm-twine-local ignores parameters

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: bkramer, alexfh, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Ignore paramater declarations of type `::llvm::Twine`, These don't suffer the same use after free risks as local twines.

[PATCH] D82162: [clang-tidy] RenamerClangTidy wont emit fixes in scratch space

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp:570 + +// We don't want a warning here as the call to this in Foo is in a scratch +// buffer so its fix-it

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272317. njames93 marked 2 inline comments as done. njames93 added a comment. Use `= delete` for getEnumMapping in template definition. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82188/new/

[PATCH] D82223: [clang-tidy] Implement storeOptions for checks missing it.

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb90d315706b: [clang-tidy] Implement storeOptions for checks missing it. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82223/new/

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:31-32 +template struct OptionEnumMapping { + // Must provide: + // static ArrayRef> getEnumMapping(); +}; aaron.ballman wrote: > Any reason not to do: > ``` > static

[PATCH] D82188: [clang-tidy] Reworked enum options handling(again)

2020-06-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 272336. njames93 added a comment. - Fix compilation failure on rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82188/new/ https://reviews.llvm.org/D82188 Files:

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82089#2100802 , @Eugene.Zelenko wrote: > It'll be interesting to run improved check over LLVM code base. I haven't tried running it over llvm, but I have had success using it with clangd in my editor, every loop I've

[PATCH] D81923: [clang-tidy] Add modernize-use-ranges check.

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271855. njames93 added a comment. Added `IncludeInserter` to include the `` header. Added support for reverse iteration controlled by config. Added support for begin/end calls via pointers. Made the begin/end call matcher more robust if other checks want to

[PATCH] D82089: [clang-tidy] modernize-loop-convert reverse iteration support

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 271856. njames93 added a comment. - Change default c++20 include to `ranges` instead of `algorithm` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82089/new/ https://reviews.llvm.org/D82089 Files:

[PATCH] D82661: [clang-tidy][NFC} Remove unnecessary includes throughout clang-tidy header files

2020-06-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 273894. njames93 retitled this revision from "[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files" to "[clang-tidy][NFC} Remove unnecessary includes throughout clang-tidy header files". njames93 edited the summary of this

[PATCH] D81917: [clang-tidy] For `run-clang-tidy.py` escape the paths that are used for analysis.

2020-06-28 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. Looks good Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81917/new/ https://reviews.llvm.org/D81917

[PATCH] D82626: [CodeComplete] Tweak completion for else.

2020-06-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm still unsure what is the best behaviour here. Would suggesting both patterns, but sort them based on what the then branch uses be best Example with: if (...) { // Statements } Suggestions: - else { // Statements } - else if (...) { // Statements } -

[PATCH] D82706: [ASTMatchers] Enhanced support for matchers taking Regex arguments

2020-06-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Added new Macros `AST(_POLYMORPHIC)_MATCHER_REGEX(_OVERLOAD)` that define a matchers that take a regular expression

[PATCH] D82707: [clang][docs] Remove untracked files from formatted status

2020-06-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: krasimir, JakeMerdichAMD, sammccall, curdeius, bollu, alexshap, jdoerfert, DavidTruby, sscalpone, MyDeveloperDay. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently on

[PATCH] D82661: [clang-tidy] Remove unnecessary includes throughout clang-tidy header files

2020-06-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added subscribers: cfe-commits, lebedev.ri, arphaman, dexonsmith, steven_wu, kbarton, hiraditya, xazax.hun, nemanjai. Herald added a reviewer: lebedev.ri. Herald added a project: clang. Plus replacing a few

[PATCH] D82002: [clangd] Drop FS usage in ClangTidyOpts

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:495-498 +bool HasChecks = false; +for (const auto : Sources) + HasChecks |= Source.first.Checks.hasValue(); +if (!HasChecks) `if (llvm::none_of(Sources,

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 270759. njames93 marked an inline comment as done. njames93 added a comment. - Remove clangd test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81785/new/ https://reviews.llvm.org/D81785 Files:

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:191 // scope, we can pull the decl out of the if statement. - DiagnosticBuilder Diag = - diag(ElseLoc, WarningMessage,

[PATCH] D81975: [clangd] Add command line option for ClangTidyConfig

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet, hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Adds a command line flag `clang-tidy-config` for specifing configuration of checks,

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. As an afterthought, Would you think it a good idea to extend this logic to the `ConfigOptionsProvider` That way you can use something along the lines of: clang-tidy --config='{InheritParentConfig: true, CheckOptions: []}' clang-tidy would then go to read the

[PATCH] D82002: [clangd] Drop FS usage in ClangTidyOpts

2020-06-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm of the idea that rather than having `ClangdTidyOptionsProvider` inherit form `tidy::ClangTidyOptionsProvider`, just have it as its own class. We don't need the interface offered by clang tidy here. It would solve the `must be threadsafe` comment issue as well as

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 269076. njames93 added a comment. Added back isExpansionInMainFile check Should put a follow up to query removing this check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81336/new/

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-07 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:425 Finder->addMatcher( - ifStmt(isExpansionInMainFile(),

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-07 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:425 Finder->addMatcher( - ifStmt(isExpansionInMainFile(),

[PATCH] D79912: Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present

2020-06-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D79912#2083477 , @Tridacnid wrote: > Bug report has been closed. I'm seeing some build failures in my inbox but > eyeballing them doesn't make me think this change is related. What is the > expectation for me in this

[PATCH] D81552: [ASTMatchers] Added hasDirectBase and hasClass Matchers

2020-06-10 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2888-2890 +/// class Foo; +/// class Bar : Foo {}; +/// class Baz : Bar {}; aaron.ballman wrote: > It seems like these

[PATCH] D81552: [ASTMatchers] Added hasDirectBase and hasClass Matchers

2020-06-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, jkorous. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Adds a matcher called `hasDirectBase` for matching the `CXXBaseSpecifier` of a class that directly derives from another

[PATCH] D81396: [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`

2020-06-10 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM, but with one more nit Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:16 using namespace clang::ast_matchers; +using clang::tidy::utils::hasPtrOrReferenceInFunc; This

[PATCH] D81396: [clang-tidy] New util `Aliasing` factored out from `bugprone-infinite-loop`

2020-06-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Aliasing.cpp:17 + +/// Return whether `S` is a reference to the declaration of `Var`. +static bool isAccessForVar(const Stmt *S, const VarDecl *Var) { Ditto `\p `.

[PATCH] D81075: [ASTMatchers] Fix crash with HasName and HasAnyName

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268142. njames93 added a comment. Fix clang-format error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81075/new/ https://reviews.llvm.org/D81075 Files: clang/include/clang/AST/PrettyPrinter.h

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268116. njames93 added a comment. Included more builtins. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80887/new/ https://reviews.llvm.org/D80887 Files:

[PATCH] D80877: [clang-tidy] Added MacroDefiniton docs for readability-identifier-naming

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG65fa0a9f7f3e: [clang-tidy] Added MacroDefiniton docs for readability-identifier-naming (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80536: [clang-tidy][modernize-loop-convert] Make loop var type human readable

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80536/new/ https://reviews.llvm.org/D80536

[PATCH] D81075: [ASTMatchers] Fix crash with HasName and HasAnyName

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, sbenza. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes crashes caused by matching fully qualified RecordDecls inside Function bodies. See https://bugs.llvm.org/show_bug.cgi?id=43639. I'm still unsure

[PATCH] D79912: Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. LGTM, but I wouldn't say no to a test case using `(Limit) -= 1`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79912/new/ https://reviews.llvm.org/D79912 ___ cfe-commits mailing

[PATCH] D81150: Use libClangTesting in the unittest for AST matchers

2020-06-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTest.h:62 +inline ArrayRef langCxx11OrLater() { + static std::vector Result = {Lang_CXX11, Lang_CXX14, Lang_CXX17, + Lang_CXX20}; Bit

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-04 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe21c3f223a35: [clang-tidy] ignore builtin varargs from pro-type-vararg-check (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81272: [clang-tidy] New check `misc-redundant-condition`

2020-06-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I feel the refactoring of Aliasing should be in its own PR, with this being a child of it. Comment at: clang-tools-extra/clang-tidy/misc/RedundantConditionCheck.cpp:38 + ifStmt(hasCondition(anyOf( +

[PATCH] D80753: [clang-tidy] remove duplicate fixes of alias checkers

2020-06-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:777 + "or make sure they are both configured the same. " + "Aliased checkers: '{0}', '{1}'", +

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How are you landing these changes, because the commit message isn't lining up with the PR name? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896

[PATCH] D81336: [clang-tidy] simplify-bool-expr ignores template instantiations

2020-06-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, lebedev.ri, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Ignore template instantiations in the matchers, Addresses readability-simplify-boolean-expr false-positive for

[PATCH] D81272: [clang-tidy] New check `misc-redundant-condition`

2020-06-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. These test cases don't show it, from what i can see this will erroneously match: if (onFire) { tryPutFireOut(); } else { if (isHot && onFire) { scream(); } } It appears that this will change the second if to: if (isHot) { scream(); }

[PATCH] D79912: Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present

2020-06-09 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce5fecb7d0a1: Assignment and Inc/Dec operators wouldnt register as a mutation when Implicit… (authored by Tridacnid, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D79912: Assignment and Inc/Dec operators wouldn't register as a mutation when Implicit Paren Casts were present

2020-06-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D79912#2082337 , @Tridacnid wrote: > tridac...@gmail.com > > https://github.com/Tridacnid > > Thanks! I've commited it on your behalf,

[PATCH] D80887: [clang-tidy] ignore builtin varargs from pro-type-vararg-check

2020-06-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 268256. njames93 added a comment. - Detect va_list type VarDecls to warn on Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80887/new/ https://reviews.llvm.org/D80887 Files:

<    3   4   5   6   7   8   9   10   11   12   >