[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:708-710 +return std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, +M1.Message) < + std::tie(M2.FilePath, M2.FileOffset, RHS.Diagnostic

[PATCH] D76990: [clang-tidy]: fix false positive of cert-oop54-cpp check.

2020-03-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not entirely sure this is where the fix needs to be for this. The test case code is whacky as hell, but from what I can see clang should always emit a `BinaryOperator` for dependent type operators. No idea why it is spewing out a `CXXOperatorCallExpr` instead. Woul

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:708-710 +return std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, +M1.Message) < + std::tie(M2.FilePath, M2.FileOffset, RHS.Diagnostic

[PATCH] D76990: [clang-tidy]: fix false positive of cert-oop54-cpp check.

2020-03-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D76990#1948516 , @ztamas wrote: > I agree, it seems suspicious that a BinaryOperator matcher does not work in > this case. However, I'm working on this level of the code, I'm looking at the > matchers like an API, what I'm ju

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-03-30 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. njames93 added a comment. njames93 added a project: clang-tools-extra. This pretty much nulls out (clang-tidy) Warn on inva

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-03-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This pretty much nulls out (clang-tidy) Warn on invalid "case" configurations for readability-identifier-naming I have moved that into a follow up patch that can be submitted now if you'd like. Repository: rG LLVM Github Monorepo

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-03-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 253751. njames93 added a comment. - Fix assertions failing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77085/new/ https://reviews.llvm.org/D77085 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp c

[PATCH] D76761: [clang-tidy] Fix crash in readability-redundant-string-cstr

2020-03-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3807079d705f: [clang-tidy] Fix crash in readability-redundant-string-cstr (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76761/new/ h

[PATCH] D77199: [clang-tidy] Address false positive in modernize-use-default-member-init

2020-04-01 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. Fixes incorrect warning emitted by "modernize-use-default-member-init" (new to 10.0.0)

[PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

2020-04-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This check needs a store Options override method as it reading options from a configuration. Check other checks to see how this is done. Comment at: clang-tools-extra/clang-tidy/llvmlibc/ImplementationInNamespaceCheck.h:35 +private: + std::string Re

[PATCH] D77085: [clang-tidy] Added support for validating configuration options

2020-04-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 254552. njames93 added a comment. - Small refactor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77085/new/ https://reviews.llvm.org/D77085 Files: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp clang-too

[PATCH] D74800: [clang-tidy] fix readability-redundant-member-init auto-fix of Function-try-block

2020-02-19 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG709fd989b644: [clang-tidy] fix readability-redundant-member-init auto-fix of Function-try… (authored by AlexanderLanin, committed by njames93). Herald added a project: clang. Herald added a subscriber: cf

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-19 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, For what this is trying to achieve I have no issue, follow up patches can be submitted for the other enhancements needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-19 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'd suggest possibly adding 2 Options at Global Level SourceFileExtensions and HeaderFileExtensions, both would take semicolon seperated lists. Reason they are Global is there are probably other checks that could use them. The SourceFileExtensions could be defaulted to

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-20 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdb8911aad726: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks… (authored by Eugene.Zelenko, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D73580: [clang-tidy] rename_check.py: maintain alphabetical order in Renamed checks section

2020-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D73580#1884042 , @Eugene.Zelenko wrote: > In D73580#1883861 , @njames93 wrote: > > > LGTM, For what this is trying to achieve I have no issue, follow up patches > > can be submitted fo

[PATCH] D72553: [clang-tidy] Add performance-prefer-preincrement check

2020-02-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Running this over llvm with only clang and clang-tools-extra enabled this was the output. ninja check-all ran successfully with no errors. Didn't try transform `TransformCxxOpCalls` or `TransformDepend

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. njames93 edited the summary of this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Acts on `BinaryOperator` and `UnaryOperator` and functions the same as `anyOf(hasOperatorName(.

[PATCH] D75046: [docs] dump_ast_matchers strips internal::(Bindable)?Matcher from Result_type

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: joerg, gribozavr2, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Remove `internal::Matcher` and `internal::BindableMatcher` from Result Type when dumping AST Matchers Repository: rG LLVM Github M

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246190. njames93 marked an inline comment as done. njames93 edited the summary of this revision. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75040/new/ https://review

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1870 +std::is_same::value, +"unsupported class for matcher"); + static_assert(std::is_same>::value, --

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:4772 +/// +/// FIXME: Tweak to improve docs generated +extern const internal::VariadicFunction Any specific things you would like to improve? The f

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 requested review of this revision. njames93 marked 3 inline comments as done. njames93 added a comment. I have fixed up the docs to be more in line with other matchers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75040/new/ https://review

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246203. njames93 added a comment. - Improved docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75040/new/ https://reviews.llvm.org/D75040 Files: clang/docs/LibASTMatchersReference.html clang/docs/tools/d

[PATCH] D75046: [docs] dump_ast_matchers strips internal::(Bindable)?Matcher from Result_type

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6f9cb025cd7: [docs] dump_ast_matchers strips internal::(Bindable)?Matcher from Result_type (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246335. njames93 added a comment. - Rebase with trunk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75040/new/ https://reviews.llvm.org/D75040 Files: clang/docs/LibASTMatchersReference.html clang/docs/too

[PATCH] D75096: [ASTMatchers] Matcher macros with params move params instead of copying

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use move semantics instead of copying for AST Matchers with parameters Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D7509

[PATCH] D75096: [ASTMatchers] Matcher macros with params move params instead of copying

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3e9a7b2ba470: [ASTMatchers] Matcher macros with params move params instead of copying (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D75040: [ASTMatchers] Adds a matcher called `hasAnyOperatorName`

2020-02-24 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a0c066c6102: [ASTMatchers] Adds a matcher called `hasAnyOperatorName` (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D75040?vs=246335&id=246375#toc Repository: rG LLVM Git

[PATCH] D75107: [clang-tidy] hicpp-signed-bitwise IgnorePositiveIntegerLiterals now partially recursive

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh, hokein, JonasToth. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Addresses hicpp-signed-bitwise.IgnorePositiveIntegerLiterals should be recursive.

[PATCH] D75113: [docs] dump-ast-matchers removes const from Matcher args and handles template functions slightly better

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, joerg. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75113 Files: clang/docs/LibASTMatchersReference.html clang/docs/t

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, Eugene.Zelenko, gribozavr2, alexfh, hokein. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Factored out some similar code in add_new_check.py and rename_check.py. Made rename_check.py less e

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246534. njames93 added a comment. - Remove unnecessary debug print Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134 Files: clang-tools-extra/clang-tidy/add_new_check.

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D74669#1892577 , @jroelofs wrote: > Implement review feedback: > > - Re-purpose `HeaderFileExtensionsUtils.h` to support headers *and* sources. > - Surround file extension in diagnostic with `''`s. > > I have these as two separ

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246610. njames93 added a comment. - Linted entire checks and moved more code into common module Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134 Files: clang-tools-ex

[PATCH] D75113: [docs] dump-ast-matchers removes const from Matcher args and handles template functions slightly better

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb653ab0e7019: [docs] dump-ast-matchers removes const from Matcher args and handles template… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D75152: Fix typo

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75152 Files: clang-tools-extra/clang-tidy/add_new_check.py Index: clang-tools-extra/clang-tidy/add_new_check.py =

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Feel free to apply this and see how it works. Tested with checks that have alias variants which seem to respond well. Renaming a check then renaming it back reverts the state to how it was before apart from release notes and maybe some non standard comments Repositor

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75134#1892607 , @Eugene.Zelenko wrote: > It'll be reasonable to find out what are naming conventions for Python in > LLVM. I just stuck to the trusty old c++ naming conventions. Having a look I see most of it is using `lo

[PATCH] D75152: Fix typo

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 closed this revision. njames93 added a comment. In D75152#1892621 , @echristo wrote: > This probably qualifies as "obvious" :) This was arc diff screwing up and creating a new revision instead of updating :) Repository: rG LLVM Github Monore

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246614. njames93 added a comment. - Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134 Files: clang-tools-extra/clang-tidy/add_new_check.py clang-tools-extra

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246650. njames93 added a comment. - Changed naming to what appears to be llvm python style Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134 Files: clang-tools-extra/c

[PATCH] D75134: [clang-tidy] Improved renamer check logic

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246653. njames93 added a comment. - Moved shared code into __init__ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75134/new/ https://reviews.llvm.org/D75134 Files: clang-tools-extra/clang-tidy/add_new_check

[PATCH] D75202: [ASTMatchers] HasNameMatcher handles `extern "C"`

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes hasName AST matcher is confused by extern "C" in namespace. Repository: rG LL

[PATCH] D75202: [ASTMatchers] HasNameMatcher handles `extern "C"`

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246829. njames93 marked an inline comment as done. njames93 added a comment. - Add extra test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75202/new/ https://reviews.llvm.org/D75202 Files: clang/lib/A

[PATCH] D75202: [ASTMatchers] HasNameMatcher handles `extern "C"`

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:518 +// Linkage Spec can just be ignored +// FIXME: Any other DeclContext kinds that can be safely disregarded +if (isa(Ctx)) -

[PATCH] D75202: [ASTMatchers] HasNameMatcher handles `extern "C"`

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG16cabf278fc8: [ASTMatchers] HasNameMatcher handles `extern "C"` (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75202/new/ https://rev

[PATCH] D75220: [clang-tidy] RenamerClangTidy now correctly renames decls

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 246853. njames93 added a comment. - Remove unnecessary include Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75220/new/ https://reviews.llvm.org/D75220 Files: clang-tools-extra/clang-tidy/utils/RenamerClang

[PATCH] D75220: [clang-tidy] RenamerClangTidy now correctly renames decls

2020-02-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, JonasToth, hokein, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 updated this revision to Diff 246853. njames93 added a comment. - Remove unnecessary include F

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, Eugene.Zelenko, JonasToth, alexfh, hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, xazax.hun. Herald added a project: clang. Motivated by Tune inspections to a specific C++

[PATCH] D74669: [clang-tidy] New check: misc-no-include-cpp

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:44 + RawStringRecommendedExtensions(Options.getLocalOrGlobal( + "RecommendedExtensions", utils::defaultHeaderFileExtensions())) { + if (!utils::parseFileExt

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75289#1896902 , @Eugene.Zelenko wrote: > Language and/or its standard is checked in other places too. Should all > similar places be refactored? They should but I feel they should be in follow up patches, the only reason

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The test cases need fixing as they are causing the build to fail. Also would it be wise to add a .clang-tidy file to libc/ to enable this module for that subdirectory? Comment at: clang-tools-extra/clang-tidy/llvmlibc/CMakeLists.txt:17 + \ No newli

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75289#1896929 , @Eugene.Zelenko wrote: > In D75289#1896925 , @njames93 wrote: > > > In D75289#1896902 , > > @Eugene.Zelenko wrote: > > > > > L

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247226. njames93 added a comment. - Updated docs to include precondition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75289/new/ https://reviews.llvm.org/D75289 Files: clang-tools-extra/clang-tidy/ClangTid

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247230. njames93 marked an inline comment as done. njames93 added a comment. - Moved isLanguageVersionSupported above register functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75289/new/ https://reviews

[PATCH] D75289: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck

2020-02-28 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39c4246e1e5b: [clang-tidy] Added virtual isLanguageVersionSupported to ClangTidyCheck (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:40 +SrcMgr::CharacteristicKind FileType) { + if (SrcMgr::isSystem(FileType)) { +if (!SM.isInMainFile(HashLoc)) { abrachet wrote: > Could

[PATCH] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-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/D73052/new/ https://reviews.llvm.org/D73052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D75429: [clangd] DefineOutline removes `override` specified from overridden methods.

2020-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. njames93 edited the summary of this revision. njames93 added a project: clang-tools-extra. The define out of line refactor tool pre

[PATCH] D75429: [clangd] DefineOutline removes `override` specified from overridden methods.

2020-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247533. njames93 added a comment. - Extend to add virtual and final support Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/refactor/

[PATCH] D75429: [clangd] DefineOutline removes `override` specified from overridden methods.

2020-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247535. njames93 added a comment. - Made the replacements macro safe Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/refactor/tweaks/

[PATCH] D75429: [clangd] DefineOutline removes `override` specified from overridden methods.

2020-03-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247538. njames93 added a comment. - Fix assertion when no Attrs are present Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/refactor/

[PATCH] D73649: [CodeComplete] Member completion for concept-constrained types.

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:4860 + return; +if (auto *CSE = llvm::dyn_cast(E)) { + // If the concept is nridge wrote: > clang-tidy gives me an `'auto *CSE' can be declared as 'const auto *CSE'` >

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh, lebedev.ri, Eugene.Zelenko. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75441 Files: clang-tools-ex

[PATCH] D75340: [clang-tidy] Change checks to use new isLanguageVersionSupported restriction

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 planned changes to this revision. njames93 added a comment. Made another pull request that could neaten this implementation up - https://reviews.llvm.org/D75441, will wait to see how that goes down before getting this pushed. Comment at: clang-tools-extra/clang-tidy

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 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/ClangTidyCheck.h:224 +/// Helper class for clang-tidy checks that only register when in `c++11` mode. +class Cpp11ClangTidyCheck : public ClangTidyCheck { + using

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247601. njames93 marked 8 inline comments as done. njames93 added a comment. - Refactor and extra test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: c

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not entirely sure how to get the spelledTokens working in a good macro safe way? Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:220 +assert(Attr->getLocation().isValid()); +if (Attr->getLocation().isMacroID(

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:220 +assert(Attr->getLocation().isValid()); +if (Attr->getLocation().isMacroID()) { + Errors = llvm::joinErro

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247620. njames93 added a comment. - Macro handling more in line with rest of clangd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/r

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247621. njames93 marked 3 inline comments as done. njames93 added a comment. - added virtual virtual Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-too

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247640. njames93 added a comment. - Fixed clang tidy warning, wont fix format as it's contradicting with the style of the rest of the function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. I suppose the only other way would be having another virtual function like inside the helper classes virtual bool additionalLanguageConstraints(const LangOptions& LangOpts) const { return true; } bool isLanguageVersionS

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75429#1901073 , @kadircet wrote: > In D75429#1901018 , @njames93 wrote: > > > - Fixed clang tidy warning, wont fix format as it's contradicting with the > > style of the rest of the fu

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247766. njames93 added a comment. - Tweaked format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Adding the parent revision means you don't need to have those changes in this patch. It will cause issues down the line. best thing is to run a diff from this to the parent and just include those changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247779. njames93 added a comment. - Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-03 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2666ccca027: [clangd] DefineOutline won't copy virtual specifiers on methods (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D75429?vs=247779&id=247828#toc Repository: rG L

[PATCH] D75340: [clang-tidy] Change checks to use new isLanguageVersionSupported restriction

2020-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 requested review of this revision. njames93 added a comment. Support for the previous point didnt go too well so will stick with the current implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75340/new/ https://reviews.llvm.org/

[PATCH] D75538: [clang-tidy] Updated language supported restrictions on some checks

2020-03-03 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75538 Files: clang-to

[PATCH] D75538: [clang-tidy] Updated language supported restrictions on some checks

2020-03-03 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/modernize-use-nullptr-basic.cpp:1 -// RUN: %check_clang_tidy -std=c++98 %s modernize-use-nullptr %t -- -- -Wno-non-literal-null-conversion -// -

[PATCH] D75538: [clang-tidy] Updated language supported restrictions on some checks

2020-03-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/test/clang-tidy/checkers/modernize-use-nullptr-basic.cpp:1 -// RUN: %check_clang_tidy -std=c++98 %s modernize-use-nullptr %t -- -- -Wno-non-literal-null-conversion -// -

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The `llvm::StringRef::split` function can take multiple split characters, So it would be best to split on both for the time being but mark cases where `,` is used as deprecated. This way we keep the options in line with other clang-tidy checks but keep some backwards c

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75621#1905879 , @jroelofs wrote: > Preserve backwards compatibility of ',' as a delimiter (for now). > > > The llvm::StringRef::split function can take multiple split characters, > > AFAIU, that's for multi-character delimiter

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Fix the test case. Comment at: clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp:29 +// intended to be matched here. +AST_MATCHER(ObjCMethodDecl, isUnavailableMethodNotOverriding) { + return !Node.isOverriding() && Node.hasAttr(

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h:38 +/// extensions. +inline StringRef defaultHeaderFileExtensions() { return ",h,hh,hpp,hxx"; } + lebedev.ri wrote: > njames93 wrote: > > A lot of configuration o

[PATCH] D71846: Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-23 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds a new ASTMatcher condition called 'hasInitStorage()' that matches if and switch statements with initializer. Then tweaks the clang-tidy 'reada

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It does support the new range for loop, I'll add in a case for that in the AST matcher Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 __

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thanks for the pointers, I'll amend those changes and update the patch, thanks for pointing it out for me. Probably be after boxing day though Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235278. njames93 added a comment. I added test cases for the matchers and the check, wasn't able to add the CXXRangeFor to the matcher as that class uses a different dialect for the initializer statement handling. I also couldn't generate the new documentat

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235300. njames93 marked an inline comment as done. njames93 added a comment. Renamed 'hasInitStorage' to 'hasInitStatement'. Added support for range for loops in 'hasInitStatement'. 'hasInitStatement' now has a match predicate on the init statement. Readabili

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235301. njames93 edited the summary of this revision. njames93 added a comment. fixed a spelling mistake in unit tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/r

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. So I wasn't happy with the vagueness of the else after return check implementation. Almost finished rewriting the check to properly handle the if statements with condition variables based on scope restrictions and where decls are used etc. int *varInitAndCondition()

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235384. njames93 edited the summary of this revision. njames93 added a comment. Think all the test cases are working, but they look like they could do with a clean up from someone who may know the clang-tidy-checks system better than myself CHANGES SINCE

[PATCH] D71846: [ASTMatchers] Fix for https://bugs.llvm.org/show_bug.cgi?id=44364

2019-12-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Should also point out that clang-format now has a better time reformatting as i expanded the replacements range to include the entire else block rather than the start and end braces CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MethodUnavailableNotOverrideCheck.cpp:47-49 + auto Iter = + std::find(Macros.begin(), Macros.end(), Tok.getRawIdentifier().str()); + return Iter != Macros.end(); `return llvm::i

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75714 Files: clang/include/clang/Basic/Diagnostic.h Index: clang/include/clang/Basic/Diagnostic.h ===

[PATCH] D75621: [clang-tidy] Use ; as separator for HeaderFileExtensions

2020-03-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.cpp:43-45 +llvm::errs() +<< "Using ',' as a file extension delimiter is deprecated. Please " + "switch your configuration to use ';'.\n"; -

[PATCH] D75569: [clang-tidy] New check for methods marked __attribute__((unavailable)) that do not override a method from a superclass.

2020-03-06 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can objc instance methods be redeclared, the AST suggests so, if so you should probably only warm on the first occurrence but create fix its for each. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75569/new/ https://revie

<    11   12   13   14   15   16   17   18   19   20   >