[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 237393. njames93 marked 3 inline comments as done. njames93 added a comment. - Fixed more documentation nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72421#1811544 , @sylvestre.ledru wrote: > > 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? > > Do you have more details about

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, hokein. njames93 added projects: clang, clang-tools-extra. Herald added a subscriber: xazax.hun. njames93 marked an inline comment as done. njames93 added inline comments. Comment at:

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

2020-01-09 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/readability-redundant-string-init.cpp:244 + // CHECK-MESSAGES: [[@LINE-1]]:11: warning: redundant string initialization + // CHECK-FIXES: Foo()

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237034. njames93 added a comment. small nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, hokein. njames93 added projects: clang, clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a new clang-tidy check that detects postfix increments and decrements that can be swapped for their prefix

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237490. njames93 added a comment. - Small refactor 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-tidy/llvm/CMakeLists.txt

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237502. njames93 added a comment. - 99% sure I have all incriments renamed now 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 llvm-prefer-preincrement check

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237500. njames93 added a comment. - Renamed incriment in test cases to increment 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 llvm-prefer-preincrement check

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237499. njames93 marked 2 inline comments as done. njames93 added a comment. - Added alias for performance module - renamed check to prefer-pre-increment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237492. njames93 marked an inline comment as done. njames93 added a comment. Figured out what memset you meant... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. could this do with an alias into performance? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/PreferPreincrementCheck.cpp:38 + // returned. Reordering those would change the behaviour of the expression. + // FIXME: Add any more parents which could use the result of the operation. + auto

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237505. njames93 added a comment. - Fix perf alias documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

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

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

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

2020-01-11 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237517. njames93 added a comment. - Rebased onto trunk fixing merge issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

[PATCH] D72566: [clang-tidy] Clang tidy is now alias aware

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. should warning be printed with all the enabled checks, or just the primary name? warning: statement should be inside braces [readability-braces-around-statements] vs warning: statement should be inside braces [readability-braces-around-statements,

[PATCH] D72566: [clang-tidy] Clang tidy is now alias aware

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, JonasToth, hokein. njames93 added projects: clang-tools-extra, clang. Herald added a subscriber: xazax.hun. Clang-tidy has had an on growing issue with blindly adding all checks from a module using the

[PATCH] D72568: [clang-tidy] Alias defintions for checks

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, JonasToth. njames93 added projects: clang, clang-tools-extra. Herald added subscribers: kbarton, xazax.hun, nemanjai. njames93 added a parent revision: D72566: [clang-tidy] Clang tidy is now alias aware. Herald added

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-13 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. Is anyone able to commit on my behalf? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72121/new/ https://reviews.llvm.org/D72121 ___ cfe-commits mailing list

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72217#1819437 , @aaron.ballman wrote: > Do you need someone to commit this on your behalf? (If you plan to continue > contributing, which I hope you do, it may be a good time for you to obtain > commit privileges: >

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238036. njames93 added a comment. - Rebase from trunk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h:29 +public: + RenamerClangTidyCheck(StringRef CheckName, ClangTidyContext *Context); + ~RenamerClangTidyCheck(); Should this be protected as this class

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/NotTrivialTypesLibcMemoryCallsCheck.cpp:33-44 +static const char BuiltinMemSet[] = "::std::memset;" +"::memset;"; +static const char BuiltinMemCpy[] =

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238052. njames93 marked 13 inline comments as done. njames93 added a comment. - Fix a few nits, extra names will follow Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238082. njames93 added a comment. - fix spelling mistake 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-tidy/llvm/CMakeLists.txt

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:199-202 +- New alias :doc:`performance-prefer-pre-increment + ` to + :doc:`llvm-prefer-pre-increment + ` was added. lebedev.ri

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72121#1817733 , @Eugene.Zelenko wrote: > Please also close PRs. Done CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72121/new/ https://reviews.llvm.org/D72121 ___

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238104. njames93 added a comment. - moved check from llvm module to performance Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238114. njames93 added a comment. - remove `This check` from docs... again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 3 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/cert-oop57-cpp.rst:6 + + Flags use of the `C` standard library functions 'memset', 'memcpy' and + 'memcmp' and similar derivatives on non-trivial

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

2020-01-14 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238153. njames93 marked an inline comment as done. njames93 added a comment. - double ticks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

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

[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 = ErrorAndDiscarded.second; + if (!Apply[ErrorIndex]) Eugene.Zelenko wrote:

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

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

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

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238753. njames93 added a comment. - added few more functions, fix format error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

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

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238740. njames93 added a comment. - Streamlined replacement application Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72553/new/ https://reviews.llvm.org/D72553 Files:

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf9c46229e4ac: [clang-tidy] Disable Checks on If constexpr statements in template… (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-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238764. njames93 added a comment. - Updated to trunk, fix release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

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

2020-01-17 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 238775. njames93 marked an inline comment as done. njames93 added a comment. - Fix If stmt and optimise building function name list Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/

[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

[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 created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. njames93 retitled this revision from "First Draft" to "[clang-tidy] RenamerClangTidy now renames dependent member expr when the member can be resolved". njames93 added reviewers: aaron.ballman,

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

[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 239150. njames93 added a comment. - replace auto when type isnt explicit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73052/new/ https://reviews.llvm.org/D73052 Files:

[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

[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

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

[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

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:143 + Result.Nodes.getNodeAs("ctorInit")) { +if (auto *Member = CtorInit->getMember()) { + if (!Member->hasInClassInitializer() ||

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237077. njames93 marked 5 inline comments as done. njames93 added a comment. Address nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Is this good to land and if so anyone able to commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71980/new/ https://reviews.llvm.org/D71980 ___ 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 236833. njames93 marked 4 inline comments as done. njames93 added a comment. Those pesky new lines CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files:

[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/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to Eugene.Zelenko wrote: > njames93 wrote: > > Eugene.Zelenko wrote: > > > njames93 wrote: > > > > Eugene.Zelenko wrote: > > > >

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

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. In D72217#1809887 , @JonasToth wrote: > In D72217#1809721 , @njames93 wrote: > > > In D72217#1809685 ,

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

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:146 +- New alias :doc:`llvm-qualified-auto + ` to Eugene.Zelenko wrote: > njames93 wrote: > > Eugene.Zelenko wrote: > > > njames93

[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 236827. njames93 marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp

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

2020-01-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added projects: clang, clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This is a very basic warning implementation of Prefer special member functions and overloaded operators to C Standard Library functions

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237297. njames93 edited the summary of this revision. njames93 added a comment. Checks for string initialisations which are spelt with braces Ensures the check will detect and fix brace initializations Example: std::string a{""}; std::string b = {""};

[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 236859. njames93 added a comment. better template support, still runs on llvm and clang libs just fine CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files:

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- The 'bugprone-suspicous-constructor-and-assignment' check was renamed to :doc:`cert-not-trivial-types-libc-memory-calls + ` Eugene.Zelenko wrote: > Is this relevant?

[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 237315. njames93 marked 4 inline comments as done. njames93 added a comment. Added a way to specify custom mem set copy and compare functions plus nit fixes Can now use the options MemSetNames, MemCpyNames and MemCmpNames to specify custom functions to

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237329. njames93 added a comment. Rebase onto trunk Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237363. njames93 added a comment. Herald added a subscriber: mgorny. Tweaked a few documentation issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

[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 237367. njames93 added a comment. Tweaked a few documentation issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72488/new/ https://reviews.llvm.org/D72488 Files:

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237368. njames93 added a comment. Undid my oopsie sending the wrong patch here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 Files:

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. whoops typo in arc, will fix, this is another patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72448/new/ https://reviews.llvm.org/D72448 ___ cfe-commits mailing list

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237377. njames93 marked 4 inline comments as done. njames93 added a comment. reformat/lint Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files:

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 237378. njames93 marked 2 inline comments as done. njames93 added a comment. - Update docs to use backticks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files:

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

2020-01-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:99 + QualType Pointee = + dyn_cast(QType->getPointeeType().getTypePtr())->desugar(); + assert(!Pointee.isNull() && "can't have a null Pointee");

[PATCH] D72566: [clang-tidy] Clang tidy is now alias aware

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Another potential solution is leave is as is by default. Then emit a warning if a check is ran twice. The warning could be suppressed by passing a option to say what behaviour you want? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D72566: [clang-tidy] Clang tidy is now alias aware

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72566#1815904 , @lebedev.ri wrote: > I agree that the current alias situation is not ideal, though i'm not sure > how much we can fix it since it crosses user interface boundary > (i.e. what fixes won't lead to some

[PATCH] D72566: [clang-tidy] Clang tidy is now alias aware

2020-01-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How does this sound? I'll put in a config option in there to disable the new alias behaviour. Personally I'd say default to the new behaviour. Then if an organisation relies on the old behaviour then can revert back with a command line option or .clang-tidy file edit

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

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 10 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/QualifiedAutoCheck.cpp:31 + Const, + Volatile // Ignore restrict as not c++ keyword. +}; aaron.ballman wrote: > We still support

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-02 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added a reviewer: aaron.ballman. njames93 added projects: clang, clang-tools-extra. Herald added a subscriber: xazax.hun. Fixes (clang-tidy) readability-identifier-naming misses fixing member variables in destructor

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236012. njames93 added a comment. More edge cases handled to do with field decls and initializers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72121/new/ https://reviews.llvm.org/D72121 Files:

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Ahh clang format script must have run, I'll undo that. I've not tried running it against the whole of llvm as I don't know what the easy way to do that is, especially given that llvm disregards it's standard naming convention for old projects and stl like containers.

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236157. njames93 added a comment. addressed issues. Running the clang-tidy on the whole of lib clang just resulted in errors when compiling due to its dependancy on llvm, but I kind of knew that was going to happen CHANGES SINCE LAST ACTION

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

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

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-31 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I have a version with a new DiscaredStmt working, but it's currently lacking test cases, docs and it was pretty much made as a copy paste job from NullStmt so I'm not going to hurry up about trying to polish that one. The new lines and test cases patch I'll get done

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

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235661. njames93 added a comment. Fixed a few of the test cases failing CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:62 Finder->addMatcher( - ifStmt(stmt().bind("if"), + ifStmt(unless(allOf(isConstexpr(), isInTemplateInstantiation())), + stmt().bind("if"),

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235645. njames93 retitled this revision from "[clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone, ReadabilityBracesAroundStatements and ReadabilityMisleadingIndentation" to "[clang-tidy] Disable Checks

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2019-12-30 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. In D71980#1799437 , @xazax.hun wrote: > Thanks for working on this, please see one of my concerns inline. > > If you are trying to fix this problem, alternatively, you could also fix it

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D71846#1800381 , @aaron.ballman wrote: > In D71846#1800344 , @njames93 wrote: > > > I'm in two minds about issuing a warning when scope restrictions prevent a > > fix. Do you think

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm in two minds about issuing a warning when scope restrictions prevent a fix. Do you think creating an option to enable or disable emitting warnings for cases where the scope prevents a fix would be a good idea? CHANGES SINCE LAST ACTION

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235752. njames93 added a comment. hopefully adhered to all conventions :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D71846#1800481 , @aaron.ballman wrote: > In D71846#1800480 , @njames93 wrote: > > > Definitely default to diagnosing everything, that's how my current > > implementation looks right

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235775. njames93 added a comment. Added option to disable warning when an automatic fix can't be applied due to scope restrictions of variables, default option is to show all warnings CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Yes please, I'm still very new to the llvm contributing system so I would have no idea what to do next. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 ___ cfe-commits

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. In D71846#1800503 , @aaron.ballman wrote: > The new option LGTM but one of the tests can be updated to have a less > complex RUN line. that was just put in when i was initially

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235788. njames93 added a comment. removed the unnecessary explicit setting of WarnOnUnfixable value for test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files:

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235791. njames93 added a comment. small reformat CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71846/new/ https://reviews.llvm.org/D71846 Files: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp

[PATCH] D71980: [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 235755. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71980/new/ https://reviews.llvm.org/D71980 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp

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

2020-01-01 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D71846#1800411 , @aaron.ballman wrote: > In D71846#1800401 , @njames93 wrote: > > > In D71846#1800381 , @aaron.ballman > > wrote: > > > > > In

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

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

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

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

<    1   2   3   4   5   6   7   8   9   >