[PATCH] D82964: [clangd] Config: loading and caching config from disk.

2020-07-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.h:59 + + // Reads fragments from a single YAML file with an fixed path. + static std::unique_ptr fromYAMLFile(llvm::StringRef AbsPathPath, `a` fixed path Repository: rG LLVM

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

2020-07-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Based on https://bugs.llvm.org/show_bug.cgi?id=46536 I've reverted this as it renders the core feature of the script as unusable (using `.*` to run over entire database) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81917

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

2020-07-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D81917#2127477 , @Abpostelnicu wrote: > @njames93 wdyt if we add another parameter to distinguish if we want to use > regex or not, and if not we escape the paths? > Also thank you so much for catching this up! As the argu

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

2020-07-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. njames93 marked an inline comment as done. Closed by commit rGf51a319cacd4: [ASTMatchers] Enhanced support for matchers taking Regex arguments (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D83053: [clang-tidy] OptionsView::store specialized on bool

2020-07-02 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. njames93 marked an inline comment as done. njames93 added inline comments. Herald added a subscr

[PATCH] D83053: [clang-tidy] OptionsView::store specialized on bool

2020-07-02 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:31 Options.store(Opts, "GslHeader", GslHeader); - Options.store(Opts,

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

2020-07-04 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/ClangTidyOptionsTest.cpp:225 +// FIXME: Figure out why this test causes crashes on mac os. +#ifndef __APPLE__ @aaron.ballman @thakis I

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

2020-07-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 275520. njames93 added a comment. Solved the mac issue 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 clang

[PATCH] D83178: [clangd] Send EOF before resetting diagnostics consumer

2020-07-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:347 // FIXME: the PP callbacks skip the entire preamble. // Checks that want to see #includes in the main file do not see them. Check->registerPPCallbacks(Clang->getSourceManag

[PATCH] D83178: [clangd] Send EOF before resetting diagnostics consumer

2020-07-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. We should also disable any header-guard related checks. Currently with this patch llvm-header-guard will fire on every header file as no macros get marked as being used for header guards by the pre processor. I'm guessing this is preamble related. Repository: rG LL

[PATCH] D82904: [clang-tidy] Warn pointer captured in async block

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:121 "bugprone-narrowing-conversions"); +CheckFactories.registerCheck("bugprone-no-escape"); CheckFactories.registerCheck( aaron.ballman wrot

[PATCH] D83178: [clangd] Send EOF before resetting diagnostics consumer

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D83178#2132490 , @kadircet wrote: > Yeah concerns around header-guard checks are real (and likely to be > annoying), so will wait for D78038 . > > I suppose we can split that into multiple patc

[PATCH] D82825: [clang-tidy] Added alias llvm-else-after-return.

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc3c693b617f: [clang-tidy] Added alias llvm-else-after-return. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82825/new/ https://revi

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, bkramer, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Add an option for header guard derived checks to control whether to skip past a license comment when adding a guar

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-06 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/utils/HeaderGuard.cpp:313 continue; - + StringRef Opening = AddNewLine == NewLineInsertions::None ? "#ifndef " + : AddNewLine

[PATCH] D83224: [clangd] Move clang-tidy check modifications into ClangdServer

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Do you think there should be a hidden command line option to disable disabling blacklisted checks, purely to prevent hindering attempts to fix these problematic checks. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:115 +// either due to crash

[PATCH] D83188: [clang-tidy] bugprone-bool-pointer-implicit-conversion doesn't handle members

2020-07-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thanks for working on this. There seems to be many places in this check where names are confusing, `Var` referring to a `MemberExpr`, `DeclRef` refering to a `MemberExpr`. I'd prefer if the names that you have added were renamed to something more in line with what the

[PATCH] D82825: [clang-tidy] Added alias llvm-else-after-return.

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc3c693b617f: [clang-tidy] Added alias llvm-else-after-return. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82825/new/ https://revi

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

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 275991. njames93 added a comment. Removed all hasClass related changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81552/new/ https://reviews.llvm.org/D81552 Files: clang/docs/LibASTMatchersReference.htm

[PATCH] D81552: [ASTMatchers] Added hasDirectBase Matcher

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I've removed the hasClass changes as they dont entirely belong in here and weren't well received. Now with just the hasDirectBase this should be in a good state. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81552/new/ h

[PATCH] D82904: [clang-tidy] Warn pointer captured in async block

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-no-escape.m:1 +// RUN: %check_clang_tidy %s bugprone-no-escape %t + aaron.ballman wrote: > Can you add an additional RUN line so we get coverage of the blocks-enabled

[PATCH] D81552: [ASTMatchers] Added hasDirectBase Matcher

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb0d3ea171bd5: [ASTMatchers] Added hasDirectBase Matcher (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D81552?vs=275991&id=276073#toc Repository: rG LLVM Github Monorepo C

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

2020-07-07 Thread Nathan James 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 rGb0d3ea171bd5: [ASTMatchers] Added hasDirectBase Matcher (authored by njames93). Changed prior to commit: https://review

[PATCH] D83301: [clang-tidy] More strict on matching the standard memset function in memset-usage check.

2020-07-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. If you want to be super explicit. Why not add `parameterCountIs(3)`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83301/new/ https://reviews.llvm.org/D83301 ___ cfe-commits m

[PATCH] D83419: [clangd] Add error() function for creating formatv-style llvm::Errors. NFC

2020-07-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not a huge fan of using `error`, maybe `createError`, its used in many other parts of llvm, typically with static linkage. Its definitely out of place in Logger, but there is no where else better for it to live short of a new file which seems overkill. Repository:

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

2020-07-11 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3bdc9814d94: [clang-tidy] Reworked enum options handling(again) (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D82188?vs=275520&id=277227#toc Repository: rG LLVM Github Mo

[PATCH] D82930: [HIP] Fix rocm detection

2020-07-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Herald added a subscriber: ormris. This is causing a test case to fail on mac http://45.33.8.238/mac/17048/step_7.txt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82930/new/ https://reviews.llvm.org/D82930 ___

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 277348. njames93 added a comment. Added /**/ style license comment test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83223/new/ https://reviews.llvm.org/D83223 Files: clang-tools-extra/clang-tidy/Cla

[PATCH] D83680: [clang-tidy] Refactor IncludeInserter

2020-07-13 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, klimek. Herald added subscribers: cfe-commits, arphaman, kbarton, xazax.hun, nemanjai. Herald added a project: clang. Simplified how `IncludeInserter` is used in Checks by abstracting away the SourceManager and PPCal

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-13 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added a comment. In D83223#2147072 , @aaron.ballman wrote: > > // This is not identified as a license comment as the > > // block is followed by code. > > void foo(); > > FWIW: > https://github.co

[PATCH] D83223: [clang-tidy] Header guard check can skip past license comment

2020-07-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 277411. njames93 added a comment. - Added expect no changes test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83223/new/ https://reviews.llvm.org/D83223 Files: clang-tools-extra/clang-tidy/utils/HeaderGuar

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It would be a good idea to emit notes to help explain the problem code, I'm thinking something along the lines of: warning: exit-handler potentially calls a jump function. Handlers should terminate by returning [cert-env32-c] note: exit-handler declared here note

[PATCH] D83053: [clang-tidy] OptionsView::store specialized on bool

2020-07-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 28. njames93 added a comment. Removed no longer needed change to ProBoundsConstantArrayIndexCheck Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83053/new/ https://reviews.llvm.org/D83053 Files: clang-to

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D83717#2150099 , @gamesh411 wrote: > extend with notes > apply minor fixes > tests are WIP until I figure out how to properly use file-check If you add tests for notes, you will need to use `CHECK-MESSAGES-DAG` and `CHECK-

[PATCH] D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C

2020-07-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Alternatively you could do something like this, though it would be a pain https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-gmock.cpp#L86 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D83053: [clang-tidy] OptionsView::store specialized on bool

2020-07-14 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfcf0f75a59fb: [clang-tidy] OptionsView::store specialized on bool (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83053/new/ https://r

[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 = Cont.rend()

[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 cfe-commi

[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&id=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: clang-

[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 cfe-commits@lists.llvm.org

[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 ACTI

[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 u

[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: clang-tool

[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 tried

[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 Scratch

[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&id=272004#toc Repository: rG LLVM

[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 clang-to

[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] 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: clang-tools-extra/clang-tidy/modernize/Loop

[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: clang-tools-extra/clang-ti

[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: clang-tools-extr

[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 passing

[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); Options.store(Opts,

[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 Gi

[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 https://reviews.llvm.

[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 clang

[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 wouldn't

[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/ https://reviews.l

[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/ ht

[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 Arra

[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. Rep

[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: clang-tools-extra/clang-tidy/ClangTidyCh

[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/ h

[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: clang/lib/ASTMatcher

[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: clang/li

[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 https://reviews.llvm.org/D82162/new/

[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/ https://revi

[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 them.

[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 st

[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 Fi

[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 revisio

[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 http://clang.llvm.org/docs/ClangFormatted

[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/ ht

[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 pat

[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 CHA

[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/ https://reviews.llvm.org/D820

[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/ https://re

[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: clang/docs/Lib

[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 check

[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: clang/do

[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] 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 bot

[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 Monore

[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 fired"

[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 the

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. @thakis Do those bots use `gn`, could that be the cause of the failures? From what I can see `gn` isn't fully supported by llvm and could certainly be the cause of failing builds. Do we have any build bots on mac that don't use `gn` but passed the test case? Repositor

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 274012. njames93 added a comment. Figuring out mac crash 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 cla

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D82711#2119651 , @aaron.ballman wrote: > I do not understand the justification here -- `IdentifierNamingCheck` and > `NamedParameterCheck` are two different checks. How do you know that this > swap continues to honor the HIC

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f228e572da2: [clang-tidy] Fix hicpp-named-paramater (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82711/new/ https://reviews.llvm.o

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

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/docs/clang-tidy/checks/performance-faster-string-find.rst:27 + ``::std::basic_string`` and ``::std::basic_string_view`` are considered. + The list of methods to consired

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

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/test/clang-tidy/checkers/google-module.cpp:4 +// CHECK-DAG: {{- key: *google-readability-braces-around-statements.ShortStatementLines[[:space:]] value: *'1'}} +// CHECK-DAG:

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 274129. njames93 added a comment. Remove unnecessary test changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82661/new/ https://reviews.llvm.org/D82661 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp

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

2020-06-29 Thread Nathan James 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 rG860aefd0784e: [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files (authored by njames93). Re

[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#2119980 , @thakis wrote: > In this case, trunk was broken for > 12h, so I'd expect there's lots of > evidence of this being broken on cmake bots too. However, the mac bots aren't > on buildbot but on http://green.lab.l

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

2020-06-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 274200. njames93 added a comment. Update docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82720/new/ https://reviews.llvm.org/D82720 Files: clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.c

<    1   2   3   4   5   6   7   8   9   10   >