[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 inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:29 + + bool isHeader() const { +return llvm::StringSwitch(Extension) gribozavr2 wrote: > njames93

[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 updated this revision to Diff 240611. njames93 marked 6 inline comments as done. njames93 added a comment. - Tweaked default corresponding header settings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. May need to roll this back, I think as i had this on the same local branch as D73052 I have brought both of them in at once Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240640. njames93 added a comment. - Tweak 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] 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 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/MissingHeaderFileDeclarationCheck.cpp:75 + continue; +if (AnyHeader || File->NamePart.equals_lower(ThisFile->NamePart)) + return; // Found a good candidate for matching decl

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG27e3671ff49b: [clang-tidy] readability-identifier-naming disregards parameters restrictions… (authored by njames93). Changed prior to commit: https://reviews.llvm.org/D73098?vs=240400=240647#toc

[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
This revision was automatically updated to reflect the committed changes. Closed by commit rG6874dfce3aef: [clang-tidy] Fix bugprone-use-after-move when move is in noexcept operator (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c90666d2c3c: [clang-tidy] readability-redundant-string-init now flags redundant… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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 added a comment. In D73413#1843103 , @alexfh wrote: > How is this different from `-Wmissing-prototypes`? This checks variables too, and it looks for a prototype specifically in the header files. missing-prototypes just ensures there is a

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3d20fd47200: [clang-tidy] readability-identifier-naming disregards parameters restrictions… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240706. njames93 added a comment. Fix diff, ready to recommit CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73098/new/ https://reviews.llvm.org/D73098 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.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 updated this revision to Diff 240718. njames93 added a comment. - Remove artifacts of old dependent review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73441/new/ https://reviews.llvm.org/D73441 Files:

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

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added a comment. Hmm a lot of the code in the redundant-string-init check is designed to be macro unsafe. Not sure the best way to follow up, discard the old macro behaviour or keep it Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-prefer-pre-increment-disable-cpp-opcalls.cpp:44 +}; + +void foo() { njames93 wrote: > JonasToth wrote: > > Test-cases that I would like to see: > > > > - only

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

2020-01-27 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240584. njames93 marked an inline comment as done. njames93 added a comment. - Added test case when the inc and dec operators are found in a base class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241374. njames93 added a comment. - Streamline fixits - Add documentation about double pointers, maybe a follow up patch to fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73548/new/

[PATCH] D73562: [ASTMatchers] Add hasPlacementArg and hasAnyPlacementArg traversal matcher for CXXNewExpr

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa156a0e28df4: [ASTMatchers] Add hasPlacementArg and hasAnyPlacementArg traversal matcher for… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I toyed with the idea of checking the access specifier for the dependent base classes, but I'm pretty sure it doesn't matter. If the compile finds 2 look ups in one base class it will pick the later dependancy regardless of whether its private or not. And if the

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

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

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D73841 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, kbarton, nemanjai. Herald added a project: clang. njames93 retitled this revision from "[clang-tidt] Fix false positive for cppcoreguidelines-init-variables" to "[clang-tidy] Fix false positive for

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-01 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/cppcoreguidelines/InitVariablesCheck.cpp:37 + optionally(hasParent(declStmt(hasParent( +

[PATCH] D73715: - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf99133e853bf: - Update .clang-tidy to ignore parameters of main like functions for naming… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. It looks good, but could you maybe create a child revision showing what it looks like with a few checks renamed to make sure everything is all working correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73580/new/

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

2020-01-31 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added a comment. In D73413#1851432 , @tonyelewis wrote: > Thanks so much for all the effort on this. I think it's really wonderful. > > I've added a couple of comments elsewhere. > > My other query:

[PATCH] D73841: [clang-tidy] Fixed crash 44745 in readability-else-after-return

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd591bdce6d62: [clang-tidy] Fixed crash 44745 in readability-else-after-return (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

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

[PATCH] D73715: - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, hokein. Herald added subscribers: llvm-commits, cfe-commits, aheejin. Herald added projects: clang, LLVM. njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/.clang-tidy:23

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

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241515. njames93 added a comment. - Streamline memberExpr matchers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[PATCH] D73715: - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang/.clang-tidy:23 + - key: readability-identifier-naming.IgnoreMainLikeFunctions +value: 1 Although identifier-naming is disabled, its still a

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-02-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/clang-tidy/readability/QualifiedAutoCheck.cpp:262 + << (Var->getType().isLocalVolatileQualified() ? "volatile " : "") + << Var->getName() <<

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. njames93 marked an inline comment as done. Closed by commit rG8a68c40a1bf2: [clang-tidy] Added option for disabling const qualifiers in readability… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D73843: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables

2020-02-02 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGefcd09cea9a5: [clang-tidy] Fix false positive for cppcoreguidelines-init-variables (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D73270: [clang-tidy] Fix false positive in bugprone-infinite-loop

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:132 } + return false; Don't change formatting of code this patch doesn't need to touch Comment at:

[PATCH] D73270: [clang-tidy] Fix false positive in bugprone-infinite-loop

2020-01-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. May not be one for this patch, but how does this check handle volatile loop variables and cases where modification isn't visible in the context e.g. extern void mutate(bool &); volatile bool* LoopCond; void foo() { for (bool Cond = true; Cond;

[PATCH] D73270: [clang-tidy] Fix false positive in bugprone-infinite-loop

2020-01-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D73270#1838956 , @gribozavr2 wrote: > In D73270#1838883 , @njames93 wrote: > > > May not be one for this patch, but how does this check handle volatile loop > > variables and cases

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240371. njames93 added a comment. - Remove unnecessary duplicated code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is what gets flagged when ran on clang/lib with CheckAnyHeader enabled (with it disabled it just goes crazy as a lot of clang headers files seem to share a source file for implementation) clang/lib

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Flags variables and functions with external linkage that don't have a declaration in the corresponding header file. Repository: rG LLVM Github Monorepo

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240372. njames93 added a comment. - fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt

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

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239988. njames93 added a comment. - Rebase trunk and fix a few nits with test file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240373. njames93 added a comment. - Ignores implicit template instantiations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

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

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

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

2020-01-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 240387. njames93 added a comment. - Warn extern declarations in source files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. https://reviews.llvm.org/D73548 Next step is to fire off an email to llvm-dev about adding it to the coding standard :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Adds an option called `AddConstQualifier` to readability-qualified-auto to toggle adding const to the auto typed pointers and references. By default its enabled but in the LLVM

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-28 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/QualifiedAutoCheck.cpp:209 + llvm::StringRef PtrConst = + (AddConstQualifier && isPointerConst(Var->getType())) ? "const " : "";

[PATCH] D73541: [Clang] Added method getTokenLocations to StringLiteral

2020-01-28 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 edited the summary of this revision. njames93 added a reviewer: rsmith. Adds a helper method `ArrayRef getTokenLocations() const` to

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

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaec6210367de: [ASTMatchers] Add cxxNoexceptExpr AST matcher (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73439/new/

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72217#1844112 , @sammccall wrote: > This check as configured for LLVM itself is pretty noisy, generating warnings > like: > > > warning: 'auto *CTSD' can be declared as 'const auto *CTSD' > > [llvm-qualified-auto] > > which

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72527#1843475 , @Eugene.Zelenko wrote: > As I wrote, I don't have GitHub commit access, so I need help with commit. Needs rebasing on trunk, ReleaseNotes.rst is causing conflicts Repository: rG LLVM Github Monorepo

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72217#1844262 , @sammccall wrote: > The text/rule there is explicitly about avoiding/clarifying copies - the > examples indeed use 'const' but AFAICT the "don't copy" reasoning only > applies to including *&. > > FWIW I

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

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72448#1844309 , @aaron.ballman wrote: > In D72448#1844032 , @njames93 wrote: > > > Hmm a lot of the code in the redundant-string-init check is designed to be > > macro unsafe. Not

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 7 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41 + auto *const Bar = cast(Baz2); + auto *volatile FooBar = cast(Baz3); + Quuxplusone wrote: > Is

[PATCH] D73562: [ASTMatchers] Add isPlacement traversal matcher for CXXNewExpr

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, mehdi_amini. Herald added a project: clang. njames93 added a reviewer: aaron.ballman. Adds a traversal matcher called `isPlacement` that matches on `placement new` operators. Repository:

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72527#1845009 , @Eugene.Zelenko wrote: > Rebase from master. Committed, I still not 100% sure on landing on behalf of someone else so I think it hasn't credited you unfortunately, arc should have better docs...

[PATCH] D72527: [clang-tidy] adjust scripts to subsubsections in Release Notes

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66e47a57205b: [clang-tidy] adjust scripts to subsubsections in Release Notes (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D73562: [ASTMatchers] Add hasPlacementArg and hasAnyPlacementArg traversal matcher for CXXNewExpr

2020-01-28 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241012. njames93 added a comment. - Changed isPlacement to hasPlacementArg and hasAnyPlacementArg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73562/new/ https://reviews.llvm.org/D73562 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 240547. njames93 added a comment. - Fix nits in test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73441/new/ https://reviews.llvm.org/D73441 Files:

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

2020-01-27 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:340 +return false; + if (FDecl->getAccess() == AS_private || FDecl->getAccess() == AS_protected) +return false;

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

2020-01-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Gonna throw it out there, those pre merge fails aren't anything to do with this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-29 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 4 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-qualified-auto.rst:41 + auto *const Bar = cast(Baz2); + auto *volatile FooBar = cast(Baz3); + aaron.ballman wrote: >

[PATCH] D73548: [clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto

2020-01-29 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241082. njames93 added a comment. - Always add const to `auto` typed variable. This update adds const to variables just typed with `auto`, but wont enforce checking on `auto *` or `auto &` unless `AddConstToQualified` is set. Repository: rG LLVM Github

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

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241459. njames93 added a comment. - Fix clang tidy warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

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

2020-02-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. So I tried to ran `./rename_check.py readability-braces-around-statements readability-braces` and results were less than desirable. It renamed the `readability-braces-around-statements` but it also renamed the google alias to `google-readability-braces`. In the

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

2020-02-01 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/misc/MissingHeaderFileDeclarationCheck.cpp:75 + continue; +if (AnyHeader || File->NamePart.equals_lower(ThisFile->NamePart)) + return; // Found a

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

2020-01-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 241449. njames93 added a comment. - Aggressive dependent lookup option added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D74689#1879065 , @hokein wrote: > Thanks for the patch. May I know the motivation of this patch? Personally, > I'd be conservative of exposing too many options. I was using custom classes with a different naming convention

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245115. njames93 added a comment. - Added support for converting loops over c style arrays Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245116. njames93 added a comment. - Small nit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 245240. njames93 added a comment. - Better template support - Removed excess code - Refactor alot of the check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

[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

[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

[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

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

2020-02-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 243545. njames93 added a comment. - Relaxed corresponding header - Added support for tag types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73413/new/ https://reviews.llvm.org/D73413 Files:

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

2020-02-11 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc69ec6476806: [clang-tidy] Added check to disable bugprone-infinite-loop on known false… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-02-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 243953. njames93 added a comment. - Simplified member expr restrictions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidAdjacentParametersOfTheSameTypeCheck.cpp:18 +namespace cppcoreguidelines { +// FIXME: Make sure this matcher only accepts functions with minimum 2 +// parameters

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I have a feeling this check is going to throw so many false positives that it'll be too noisy to run on any real codebase. There should be a way to silence this when it is undesired like in the example for `int max(int a, int b);`. A possible solution could be based

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

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I have a feeling this check should be called something along the lines of bugprone-suspicous-include. Comment at: clang-tools-extra/clang-tidy/misc/NoIncludeCPPCheck.cpp:62 + Check.diag(HashLoc, "suspicious #include") + <<

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

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp:43 + +void SuspiciousIncludePPCallbacks::InclusionDirective( +SourceLocation HashLoc, const Token , StringRef FileName, This function is used for

[PATCH] D74463: [clang-tidy] Add new check avoid-adjacent-unrelated-parameters-of-the-same-type

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D74463#1878290 , @vingeldal wrote: > I am pretty sure that an option to allow short names would cause a > relatively big hit on performance (relative to how it runs without the > option) for this check while also

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244939. njames93 added a comment. - Added check if size() method is const for range loops - Optimised FixItHint creation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D74689 Files: clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244867. njames93 added a comment. - New line and undo clang format artefact Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

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

2020-02-16 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/NoIncludeCPPCheck.cpp:11-13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +using namespace clang::ast_matchers; You don't need to include or use the AST matchers in a preprocessor

[PATCH] D74689: [clang-tidy] Better custom class support for performance-inefficient-vector-operation

2020-02-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244952. njames93 added a comment. - Moved const size method check to matcher Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74689/new/ https://reviews.llvm.org/D74689 Files:

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

2020-02-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244557. njames93 added a comment. - Fix order in release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

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

2020-02-13 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244555. njames93 added a comment. - Added option to enable transforming template dependent types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

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

2020-02-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 244601. njames93 added a comment. - Small refactor of code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

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

[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

[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] D73052: [clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved

2020-02-10 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] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236946. njames93 marked 4 inline comments as done. njames93 added a comment. Runs on the entire llvm project with no build issues afterwards. also fixed my facepalm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done and an inline comment as not done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:94-95 + auto Pointee = QType.getTypePtr()->getPointeeType(); + if (Pointee.isNull()) +

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:94-95 + auto Pointee = QType.getTypePtr()->getPointeeType(); + if (Pointee.isNull()) +return Pointee.isLocalConstQualified(); + return Pointee.isConstQualified();

[PATCH] D72421: [clang-tidy] Refresh the add_new_check.py now that we use a table + autofix

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Thanks for this, Also how would you feel about adding a parameter to the script that could create alias definitions in much the same way? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72421/new/

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237390. njames93 marked 3 inline comments as done. njames93 added a comment. - Fix format of options docs and remove unnecessary empty line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/

[PATCH] D72488: [clang-tidy] Add check for CERT-OOP57-CPP

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237422. njames93 added a comment. - Reworked options documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

<    1   2   3   4   5   6   7   8   9   >