[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

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

2020-02-12 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244087. njames93 added a comment. - Made AggressiveDependentMemberLookup option Global Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[PATCH] D74374: [clang-tidy] Added check to disable bugprone-infinite-loop on known false condition

2020-02-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 edited the summary of this revision. njames93 added reviewers: aaron.ballman, alexfh, hokein, gribozavr2, JonasToth. njames93 added a project: clang-tools-extra. Addresses

[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

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

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

[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

[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

[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

[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

[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

[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

[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

[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

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

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

[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

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

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

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

[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

[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

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

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

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

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

2020-01-21 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239253. njames93 added a comment. - Fix assertion causing failing tests in debug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-21 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, JonasToth, alexfh, hokein. njames93 added projects: clang, clang-tools-extra. Herald added subscribers: kristof.beyls, xazax.hun. Typically most main functions have the signature: int main(int argc, char *argv[]) To

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. For the record this convention appears everywhere in LLVM even though LLVM style is to have parameters starting with uppercase letters Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/

[PATCH] D73090: [clang-tidy] Fix PR#44528 'modernize-use-using and enums'

2020-01-21 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. If you are using diff to create a patch, use `-U99` to get the full context of the patch Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-using.cpp:274 +// CHECK-FIXES: using EnumT = enum { ea, eb }; \ No newline at end of

[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

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

[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() &&

[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

[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

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

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

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

[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

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

[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

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

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

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

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

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

[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

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

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

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

[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

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

[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

[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

[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

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

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

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

[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

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

[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

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

[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

[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

[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

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

[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

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

[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] 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] 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 wont copy virtual specifiers on methods (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D75429?vs=247779=247828#toc Repository: rG LLVM

[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] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240400. njames93 added a comment. - Address nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files:

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240402. njames93 marked 5 inline comments as done. njames93 added a comment. - Address some nits, more test cases need adding though Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/PreferPreIncrementCheck.cpp:63 + + if (!getLangOpts().CPlusPlus || !TransformCxxOpCalls) +return; JonasToth wrote: > Why would you deactivate the check for c-code? > I

[PATCH] D73203: [clang-tidy] Prevent a remove only fixit causing a conflict when enclosed by another fixit

2020-01-24 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240163. njames93 added a comment. - Small edge case tweak Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73203/new/ https://reviews.llvm.org/D73203 Files:

[PATCH] D73439: [ASTMatchers] Add cxxNoexceptExpr AST matcher

2020-01-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds a cxxNoexceptExpr matcher that matches the noexcept operator . Repository: rG LLVM Github

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-26 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, JonasToth, hokein, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fixes noexcept operator misinterpreted as being evaluated

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-26 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:58 + } + if (B.isInvalid() || E.isInvalid()) +return llvm::None; aaron.ballman wrote: > Should we

[PATCH] D73439: [ASTMatchers] Add cxxNoexceptExpr AST matcher

2020-01-26 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240461. njames93 added a comment. - Fix typo in documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73439/new/ https://reviews.llvm.org/D73439 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:383 + } else { +static llvm::Regex Matcher("(^((W[Mm])|(wm))ain([_A-Z]|$))|([a-z0-9_]W[Mm]" + "ain([_A-Z]|$))|(_wmain(_|$))",

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239825. njames93 added a comment. - use regex for func name matching Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files:

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239830. njames93 added a comment. - Dont trim func name before regex Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files:

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 3 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-use-after-move.cpp:1276 +namespace PR44667 { +#define REQUIRE(expr) (void)(expr); +struct S {}; gribozavr2 wrote: >

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240506. njames93 added a comment. - added more unevaluated context checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73441/new/ https://reviews.llvm.org/D73441 Files:

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240507. njames93 added a comment. - Elide braces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73441/new/ https://reviews.llvm.org/D73441 Files: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp:387 + unless(inDecltypeOrTemplateArg()), + unless(hasAncestor(cxxNoexceptExpr(

[PATCH] D72448: [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239884. njames93 added a comment. - Small refactor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:383 + } else { +static llvm::Regex Matcher("(^((W[Mm])|(wm))ain([_A-Z]|$))|([a-z0-9_]W[Mm]" +

[PATCH] D73098: [clang-tidy] readability-identifier-naming disregards parameters restrictions on main like functions

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239902. njames93 added a comment. - Added checks for access specifiers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files:

[PATCH] D73441: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240512. njames93 added a comment. - Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73441/new/ https://reviews.llvm.org/D73441 Files:

[PATCH] D73413: [clang-tidy] Add check to detect external definitions with no header declaration

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added a comment. I'll work up those other test cases Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:29 + + bool isHeader() const { +return llvm::StringSwitch(Extension)

  1   2   3   4   5   6   7   8   9   10   >