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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa42c3eb599cb: [clang-tidy] Add check for CERT-OOP57-CPP (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llv

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239153. njames93 added a comment. - rebase truck Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp clang-

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239167. njames93 marked 4 inline comments as done. njames93 added a comment. - Added not type template test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:282 +: DepMemberRef->getBaseType(); +CXXRecordDecl *Base = BaseType.getTypePtr()->getAsCXXRecordDecl(); +if (!Base) JonasToth

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. hmmm annoyingly this change causes a crash in a side project I'm creating, gotta go bug hunting now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 _

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239208. njames93 added a comment. - Added some sanity tests that fix weird crashes - Added support for CXXMethodDecls that are referenced with depended scope member expr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

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

2020-01-20 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239218. njames93 added a comment. - rebase master figure out the llvm pre-merge lint test fail Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files: clang-tools-ext

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

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

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

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

[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 marked an inline comment as done. njames93 added a comment. In D73098#1832131 , @Mordante wrote: > Would it make sense to also allow wmain with wchar_t? > https://docs.microsoft.com/en-us/cpp/cpp/main-function-command-line-args?view=vs-2019 Doe

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

2020-01-22 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/D73203 Files: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp Index: clang-tools-extra/clang-tidy/ClangT

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

2020-01-22 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. In D73098#1833736 , @aaron.ballman wrote: > In D73098#1832489 , @njames93 wrote: > > > In D73098#1832131

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

2020-01-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:726 + unsigned ErrorIndex = ErrorAndDiscarded.first; + const auto &Discarded = ErrorAndDiscarded.second; + if (!Apply[ErrorIndex]) Eugene.Zelen

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

2020-01-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239636. njames93 marked 3 inline comments as done. njames93 added a comment. - remove unnecessary auto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73203/new/ https://reviews.llvm.org/D73203 Files: clang-t

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

2020-01-22 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 239734. 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: clang-tools-extra/clang-tidy/readability/IdentifierNamingChec

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

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

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

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

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

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

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

[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; mutate(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 wher

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

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

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

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

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

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

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

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

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

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

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

[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( .bind("call

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

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

[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 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: clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp

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

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

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

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

[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] 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 clang/includ

[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&id=240647#toc Rep

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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 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 " : ""; l

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

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

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

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

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

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

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

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

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

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

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

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2023-03-22 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D130181#4213779 , @LegalizeAdulthood wrote: > I'm not certain that the result of the transformation is more "readable"; is > this check intended to aid conformance to a style guide? One of the driving factors of this is tha

[PATCH] D130181: [clang-tidy] Add readability-use-early-exits check

2023-03-23 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseEarlyExitsCheck.cpp:359 +void UseEarlyExitsCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher(translationUnitDecl(), this); +} PiotrZSL wrote: > This will tr

[PATCH] D146875: [clang-tidy] Fix example provided by add_new_check.py

2023-03-29 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D146875#4229544 , @carlosgalvezp wrote: > I think easiest is to go for Option A) - this is how we normally write checks > nowadays. Maybe the discussion about removing support for `--fix-notes` can > be done in an RFC? Fix

[PATCH] D144828: [clang-tidy] Add misc-header-include-cycle check

2023-02-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This is a great check that I've been meaning to work on for ages but never had time. It mostly looks good but there are a few issues I feel there is another issue that this can be very spammy with diagnostics(though clang-tidy is likely suppressing the duplicated ones).

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2023-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 511702. njames93 added a comment. Rebased and sorted release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137302/new/ https://reviews.llvm.org/D137302 Files: clang-tools-extra/clang-tidy/modernize/CM

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2023-04-07 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/modernize/TypeTraitsCheck.cpp:170 + +static constexpr char Bind[] = ""; + ccotter wrote: > NIT: should the bound node have some meaningful non-empt

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2023-04-07 Thread Nathan James via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. njames93 marked 2 inline comments as done. Closed by commit rG376168babb51: [clang-tidy] Add modernize-type-traits check (authored by njames9

[PATCH] D147802: [clangd] Handle destructors in DefineOutline tweak

2023-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: kadircet, sammccall. Herald added a subscriber: arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fix

[PATCH] D147802: [clangd] Handle destructors in DefineOutline tweak

2023-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 511780. njames93 added a comment. Clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147802/new/ https://reviews.llvm.org/D147802 Files: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp

[PATCH] D147808: [clangd] Support defaulted destructors in Define Outline tweak

2023-04-07 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added a subscriber: arphaman. Herald added a project: All. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Som

<    13   14   15   16   17   18   19   20   21   >