[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. @Eugene.Zelenko I think there should be a herald rule for marking projects as clang-tools-extra automatically Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 _

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 326977. njames93 marked an inline comment as done. njames93 added a comment. Use single back ticks for option values. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 F

[PATCH] D97639: [clang-tidy][NFC] Use equalsBoundNode matchers to simplify LoopConvertCheck

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, gribozavr2. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Make use of the `equalsBoundNode` matcher to ensure

[PATCH] D97142: [clang-tidy] Simplify unused RAII check

2021-02-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. LG, with 1 nit. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-unused-raii.cpp:81-82 + + int i = 0; + (void)i; +} Is this necessary?

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Is it not nicer to name the class `PolymorphicMatcher` and do away with `WithParamN`, It may require partial specialization for the empty parameters case. But I think it would be worth it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D97653: [clang-tidy] Fix RenamerClangTidy checks breaking lambda captures.

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, JonasToth, rsmith, MyDeveloperDay. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: shafik. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: c

[PATCH] D97653: [clang-tidy] Fix RenamerClangTidy checks breaking lambda captures.

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Where would be a good place for testing refersToDefaultCapture support? Comment at: clang/lib/Sema/SemaLambda.cpp:1619 + if (Cap.isVariableCapture() && ImplicitCaptureLoc.isValid()) +cast(InitExpr)->setRefersToDefaultCapture(true); InitializedE

[PATCH] D97653: [clang-tidy] Fix RenamerClangTidy checks breaking lambda captures.

2021-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327019. njames93 added a comment. Add a test case using init capture. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97653/new/ https://reviews.llvm.org/D97653 Files: clang-tools-extra/clang-tidy/utils/Renam

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327077. njames93 added a comment. Add tests to ensure Parens are handled correctly. Add support for pointers to and smart pointers to unique_ptr objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/

[PATCH] D97681: [ASTMatchers] Add matchers for `CXXDeleteExpr`

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, steveire. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add `deletes` traveral matcher which matches on the expression being delete Extend `CXXNewEx

[PATCH] D97683: [clang-tidy] Add include to misc-uniqueptr-reset-release

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is the only remaining check that creates `std::move` includ

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94554/new/ https://reviews.llvm.org/D94554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D97683: [clang-tidy] Add include to misc-uniqueptr-reset-release

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp:22 +: ClangTidyCheck(Name, Context), + Inserter(Options.getLocalOrGlobal("IncludeStyle", +utils::IncludeSorter::IS_LLVM))

[PATCH] D97681: [ASTMatchers] Add matchers for `CXXDeleteExpr`

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7621 +/// matches the expression 'delete Ptr'. +AST_MATCHER_P_OVERLOAD(CXXDeleteExpr, deletes, internal::Matcher, + InnerMatcher, 1) { aaron.ballman

[PATCH] D97681: [ASTMatchers] Add matchers for `CXXDeleteExpr`

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7621 +/// matches the expression 'delete Ptr'. +AST_MATCHER_P_OVERLOAD(CXXDeleteExpr, deletes, internal::Matcher, + InnerMatcher, 1) { aaron.ballman

[PATCH] D97614: [clang-tidy] Remove OptionError

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG82289aa6c88a: [clang-tidy] Remove OptionError (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D91164: [clang-tidy] Improve C++ support in bugprone-signal-handler.

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:100-101 const LangOptions &LangOpts) const { - // FIXME: Make the checker useful on C++ code. - if (LangOpts.CPlusPlus) + // FIXME: Improve C++ support. + if (LangOpt

[PATCH] D97632: [clang-tidy] Simplify diagnostics for UniqueptrResetRelease check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8adfb3822469: [clang-tidy] Simplify diagnostics for UniqueptrResetRelease check (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D97632?vs=326976&id=327179#toc Repository: rG

[PATCH] D97683: [clang-tidy] Add include to misc-uniqueptr-reset-release

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327185. njames93 added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97683/new/ https://reviews.llvm.org/D97683 Files: clang-tools-extra/clang-tidy/misc/UniqueptrResetReleaseCheck.cpp c

[PATCH] D97313: [clang-tidy] Tweak misc-static-assert fix in c++17

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f9f7d02aaac: [clang-tidy] Tweak misc-static-assert fix in c++17 (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D97313?vs=325855&id=327186#toc Repository: rG LLVM Github Mo

[PATCH] D97158: [ASTMatchers] Make nullPointerConstant usable at top-level

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Should we make `nullPtrConstant()` a top level mather? I feel like this change would actually throw users off. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97158/new/ https://reviews.llvm.org/D97158

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLPTR: :[[@LINE-1]]:3: warning: prefer '= nullptr' aaron.ballman wrote: > Not th

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-uniqueptr-delete-release.cpp:40 + + delete (P2.release()); + // CHECK-MESSAGES-NULLPTR: :[[@LINE-1]]:3: warning: prefer '= nullptr' aaron.ballman wrote: > njames

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327258. njames93 added a comment. Add test demonstrating we aren't detecting bound member functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97630/new/ https://reviews.llvm.org/D97630 Files: clang-too

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 3 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:159 ClangdServer(const GlobalCompilationDatabase &CDB, const ThreadsafeFS &TFS, - const Options &Opts, Callbacks *Callbacks = nullptr);

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327280. njames93 marked an inline comment as done. njames93 added a comment. Address some comments, though I have a feeling @Sammccall, I may have to wait until DraftStore has been refactored first before continuing on with this. Repository: rG LLVM Gith

[PATCH] D97630: [clang-tidy] Added option to uniqueptr delete release check

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8bfc14193170: [clang-tidy] Added option to uniqueptr delete release check (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D84924: [clang-tidy] Added command line option `fix-notes`

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGabbe9e227ed3: [clang-tidy] Added command line option `fix-notes` (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please can you upload diffs with full context or using arcanist . It may be worth adding a case where if

[PATCH] D97771: [cte][NFC] Remove all references to stdlib stream headers.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, sammccall, alexfh. Herald added subscribers: usaxena95, kadircet, arphaman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Inclusion of iostream is frobidden

[PATCH] D97771: [cte][NFC] Remove all references to stdlib stream headers.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp:38 + if (!Buffer) { +llvm::errs() << "Error cannot open JSON request file:" << FileName << ": " + << Buffer.getError().message() << "\n"; aaron

[PATCH] D97784: [ASTMatchers] Always create a "binding" for the node being matched on.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, steveire. njames93 published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Most often when using matchers, there is a need to get the root node that the matcher matc

[PATCH] D97805: [clang-query] Add option to enable only displaying main file matches

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, steveire. njames93 published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add option `set match-scope (include-headers|main-file-only)` to control only printing matches fro

[PATCH] D97771: [cte][NFC] Remove all references to stdlib stream headers.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. njames93 marked an inline comment as done. Closed by commit rG00c7d6699a39: [cte][NFC] Remove all references to stdlib stream headers. (authored by njames93). Changed

[PATCH] D97806: [clang-query] Fix help text after D91918

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After rG5e1801813d93210acae84ff3c68a01512c2df9bc

[PATCH] D97156: [ASTMatchers] Make Param functors variadic

2021-03-02 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, assuming none of the later changes have effected the documentation script. In D97156#2598398 , @steveire wrote: > In D97156#2593209

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327646. njames93 added a comment. Getting there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94554/new/ https://reviews.llvm.org/D94554 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clang-tools-ex

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/DraftStore.h:37 + DraftStore(const ThreadsafeFS &BaseFS); + sammccall wrote: > having DraftStore sit on top of TFS seems a bit inside-out, giving it bigger > scope than necessary. > > What

[PATCH] D97639: [clang-tidy][NFC] Use equalsBoundNode matchers to simplify LoopConvertCheck

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a91b8232a5d: [clang-tidy][NFC] Use equalsBoundNode matchers to simplify LoopConvertCheck (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D97553: [clang][NFC] pack StaticDiagInfoRec

2021-03-02 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG335375ef2c66: [clang][NFC] pack StaticDiagInfoRec (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:389 + + class DirtyFS : public ThreadsafeFS { + public: Probably needs moving to its own place, but wasn't sure where best to put it. Comment at: clang-tools-

[PATCH] D97805: [clang-query] Add option to enable only displaying main file matches

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-query/Query.cpp:60-61 +"main-file-only " +"Only match nodes from the main source file. This mode is the " +"default.\n" " set output "

[PATCH] D97806: [clang-query] Fix help text after D91918

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe7080aa22533: [clang-query] Fix help text after D91918 (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D97491: [clang-tidy] Deprecate readability-deleted-default check

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG19aefd2d5dc3: [clang-tidy] Deprecate readability-deleted-default check (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D97491?vs=326449&id=327802#toc Repository: rG LLVM Git

[PATCH] D97805: [clang-query] Add option to enable only displaying main file matches

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 327921. njames93 added a comment. Change default match mode to include all files. Update so the prompt to switch match mode is only displayed once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97805/new/ http

[PATCH] D97889: [clang-tidy] Fix assert in modernize-loop-convert

2021-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added subscribers: usaxena95, kadircet, xazax.hun. njames93 requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. I'm unable to figure out a reproducti

[PATCH] D96245: [clangd] Propagate CodeActions in addition to Fixes for diagnostics

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. One little curveball I'm still kind of hoping we can integrate clang-format into our codeAction workflow, in the hopes of addressing https://github.com/clangd/clangd/issues/429. While we compute the edits eagerly we don't actually send them until the client request for

[PATCH] D97121: [clang-tidy] Add a single fix mode to clang-tidy

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328134. njames93 added a comment. Rename mode to self contained diags. Added support for modernize-loop-convert. Currently transforming a loop will prevent any nested loops being transformed if they are affected by the first transformation. This is counter

[PATCH] D97805: [clang-query] Add option to enable only displaying main file matches

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328135. njames93 added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97805/new/ https://reviews.llvm.org/D97805 Files: clang-tools-extra/clang-query/Query.cpp clang-tools-extra/clang-q

[PATCH] D97940: [clang-tidy] Extend LoopConvert on array with `!=` comparison

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Enables transforming loops of the form: for (int i = 0; I !=

[PATCH] D97889: [clang-tidy] Fix assert in modernize-loop-convert

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:316-317 return nullptr; + if (!Member->getMemberDecl()->getDeclName().isIdentifier()) +return nullptr; StringRef Name = Member->getMemberDecl()->getName(); ---

[PATCH] D96760: [clang-format] Suppress diagnostics on second parse

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. LGTM, but see what @MyDeveloperDay has to say. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96760/new/ https://reviews.llvm.org/D96760 ___ cfe-commits mailing list cfe-commits@

[PATCH] D97889: [clang-tidy] Fix assert in modernize-loop-convert

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:316-317 return nullptr; + if (!Member->getMemberDecl()->getDeclName().isIdentifier()) +return nullptr; StringRef Name = Member->getMemberDecl()->getName(); ---

[PATCH] D97955: [clang-tidy] Refactor loop-convert to bring most of the checking into matchers

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Move all checking on the for loop declaration into the matchers.

[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, klimek, steveire. Herald added a subscriber: mgorny. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If there is a typo in parsing and we can see a close matc

[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Tests haven't been added yet, wanted to gauge opinions on this first before fully committing to it. Comment at: clang/lib/ASTMatchers/Dynamic/TypoSuggester.cpp:40 +} // namespace clang \ No newline at end of file Duly noted :) Repo

[PATCH] D97940: [clang-tidy] Extend LoopConvert on array with `!=` comparison

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa85eb11129ce: [clang-tidy] Extend LoopConvert on array with `!=` comparison (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D98034: [clang-tidy] Use-after-move: Ignore moves inside a try_emplace.

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 requested changes to this revision. njames93 added a comment. This revision now requires changes to proceed. While `try_emplace` is a special case, it's may not be the only special case in someone's codebase, this should be behind extended with options to let users handle their special

[PATCH] D98034: [clang-tidy] Use-after-move: Ignore moves inside a try_emplace.

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D98034#2606488 , @njames93 wrote: > While `try_emplace` is a special case, it's may not be the only special case > in someone's codebase, this should be extended with options to let users > handle their special containers.

[PATCH] D97960: [clang-tidy] bugprone-signal-handler improvements: display call chain

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This needs tests demonstrating the notes. The defacto way is to replace all `CHECK-MESSAGES`Directives with `CHECK-NOTES`. This'll for file check to look for lines containing `note`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D98034: [clang-tidy] Use-after-move: Ignore moves inside a try_emplace.

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D98034#2606535 , @mboehme wrote: > In D98034#2606488 , @njames93 wrote: > >> While `try_emplace` is a special case, it's may not be the only special case >> in someone's codebase, this

[PATCH] D97960: [clang-tidy] bugprone-signal-handler improvements: display call chain

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The issue is FileCheck expects its directives to be in order they appear in the file being checked. Notes are always emitted just after the warning they are attached to. So there are a few ways to go: - use CHECK-NOTES-DAG to disregard the ordering and place them next

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328663. njames93 marked 5 inline comments as done. njames93 added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files: clang/include/cl

[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328664. njames93 added a comment. Address clang-tidy issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97963/new/ https://reviews.llvm.org/D97963 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostic

[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h:62-72 ET_RegistryMatcherNotFound = 1, -ET_RegistryWrongArgCount = 2, -ET_RegistryWrongArgType = 3, -ET_RegistryNotBindable = 4, -ET_RegistryAmbiguousOverload = 5

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328859. njames93 added a comment. Add check to prevent emitting copy capture fixes for non-copyable types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files: clan

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328967. njames93 marked 6 inline comments as done. njames93 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files: clang/include/c

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329011. njames93 marked 8 inline comments as done. njames93 added a comment. Address more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files: clang/incl

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:17444 +if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) { + if (RD->hasSimpleCopyConstructor()) +return true; sammccall wrote: > I suspect you need to handle the case where R

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329066. njames93 added a comment. Update to not offer Default capture fix if other variables are also captured. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org/D96975 Files:

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 11 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:389 + + class DirtyFS : public ThreadsafeFS { + public: sammccall wrote: > njames93 wrote: > > Probably needs moving to its own place

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329070. njames93 marked 2 inline comments as done. njames93 added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94554/new/ https://reviews.llvm.org/D94554 Files: clang-tools-ext

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329075. njames93 added a comment. Prevent explicit 'this' capture fix-it if default capture mode is '=' and not in c++20 mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.llvm.org

[PATCH] D95043: [clangd] Use Dirty Filesystem for cross file rename.

2021-03-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329126. njames93 added a comment. Rebase and remove an addressed FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95043/new/ https://reviews.llvm.org/D95043 Files: clang-tools-extra/clangd/ClangdServer.

[PATCH] D95043: [clangd] Use Dirty Filesystem for cross file rename.

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.h:40 + // The filesystem to query when performing cross file renames. + llvm::IntrusiveRefCntPtr FS; sammccall wrote: > Index + FS are both only used for cross-file renames a

[PATCH] D94554: [clangd] Add a Filesystem that overlays Dirty files.

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0250b053b5aa: [clangd] Add a Filesystem that overlays Dirty files. (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D94554?vs=329070&id=329319#toc Repository: rG LLVM Github

[PATCH] D95043: [clangd] Use Dirty Filesystem for cross file rename.

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329354. njames93 added a comment. Update to assert that either Index and FS are both set, or neither set. Document this behaviour. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95043/new/ https://reviews.llvm.

[PATCH] D98274: [clangd][NFC] Use std::string::replace in SourceCode:applyChange.

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Just looks nicer and easier to rea

[PATCH] D98275: [clang-tidy] Fix mpi checks when running multiple TUs per clang-tidy process

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Both the mpi-type-mismatch and mpi-buffer-deref check make use o

[PATCH] D98274: [clangd][NFC] Use std::string::replace in SourceCode:applyChange.

2021-03-09 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc92d2ea59e79: [clangd][NFC] Use std::string::replace in SourceCode:applyChange. (authored by njames93). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is almost ready but a few more points need addressing. Running clang-format over the inc file is pointless and just extends compilation time while adding an unnecessary dependency on clang-format. The inc file should likely live in the include build directory, All t

[PATCH] D98296: [clang-tidy] Simplify readability checks to not need ignoring* matchers

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please address the format issues. Comment at: clang-tools-extra/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp:45 callee( memberExpr(hasObjectExpression(allOf( any

[PATCH] D98338: [clang-tidy] Fix bugprone-terminating-continue when continue appears inside a switch

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://llvm.org/PR9492. Repository: rG LLVM Github Mo

[PATCH] D95043: [clangd] Use Dirty Filesystem for cross file rename.

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7044f1d875e3: [clangd] Use Dirty Filesystem for cross file rename. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95043/new/ https://

[PATCH] D93978: [clangd] Use dirty filesystem when performing cross file tweaks

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329649. njames93 added a comment. Rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93978/new/ https://reviews.llvm.org/D93978 Files: clang-tools-extra/clangd/ClangdServer.cpp clang-tools-extra/clang

[PATCH] D93978: [clangd] Use dirty filesystem when performing cross file tweaks

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:575 return CB(InpAST.takeError()); -auto Selections = tweakSelection(Sel, *InpAST); +// FIXME: Should we use the dirty fs here? +auto FS = TFS.view(llvm::None); --

[PATCH] D94942: [clangd] Add tweak for implementing abstract class

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329680. njames93 added a comment. Tweak the prepare method to just check for methods that need implementations, this saves some work that could be deferred to the apply method. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman, javed.absar. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM

[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.h:195-198 void addDocument(PathRef File, StringRef Contents, llvm::StringRef Version = "null", WantDiagnostics WD = WantDiagnostics::Auto,

[PATCH] D97955: [clang-tidy] Refactor loop-convert to bring most of the checking into matchers

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 3 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp:859 const auto *LoopVar = Nodes.getNodeAs(InitVarName); - const auto *EndVar = Nodes.getNodeAs(EndVarName); - - // If the loop c

[PATCH] D97955: [clang-tidy] Refactor loop-convert to bring most of the checking into matchers

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329765. njames93 marked an inline comment as done. njames93 added a comment. Update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97955/new/ https://reviews.llvm.org/D97955 Files: clang-tools-extra/clang-t

[PATCH] D93164: [AST] Add generator for source location introspection

2021-03-10 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. nit: A few reformat hints Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93164/new/ https://reviews.llvm.org/D93164

[PATCH] D98377: [clangd] Show padding following a field on field hover.

2021-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/unittests/HoverTests.cpp:105 + HI.Size = 1; + HI.Padding = 15; + HI.AccessSpecifier = "public"; Does it make any sense to include the padding for union fields? Reposito

[PATCH] D98416: [clang-tidy] Fix cppcoreguidelines-narrowing-conversions false positive

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman. Herald added subscribers: shchenz, kbarton, xazax.hun, nemanjai. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix https://llvm.org/PR49498. The che

[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329933. njames93 marked 4 inline comments as done. njames93 added a comment. Remove some unneeded changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98364/new/ https://reviews.llvm.org/D98364 Files: cla

[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 329939. njames93 added a comment. Remove other unnecessary ownership. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98364/new/ https://reviews.llvm.org/D98364 Files: clang-tools-extra/clangd/ClangdLSPServer

[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I've cleaned some changes up a bit. I do agree its not as important as the dirty buffer case, but this is about uniformity as much as anything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98364/new/ https://reviews.llvm

[PATCH] D96975: [Sema] Add some basic lambda capture fix-its

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb559c8d5ebe: [Sema] Add some basic lambda capture fix-its (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96975/new/ https://reviews.

[PATCH] D98424: [clangd] Reject renames to non-identifier characters

2021-03-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/refactor/Rename.cpp:473-488 +static bool mayBeValidIdentifier(llvm::StringRef Ident) { + assert(llvm::json::isUTF8(Ident)); + if (Ident.empty()) +return false; + // We don't check all the rules for non-as

<    8   9   10   11   12   13   14   15   16   17   >