[PATCH] D72333: [clang-tidy] Disable match on `if constexpr` statements in template instantiation for `readability-misleading-indentation` check.

2020-01-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I could never seem to get the tests to handle differently in templated and non templated code. Maybe i was just being stupid. Think the root cause is that the check detects if the if column appears on a different column to either the else or the closing brace if its on

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

2020-01-07 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. Would you say this behaviour is better? void baz() { auto MyFunctionPtr = getPtrFunction(); // CHECK-MESSAGES-NOT: :[[@LINE-1]]:3: warning: 'auto MyFunctionPtr' can be declared as 'auto *MyFunctionPtr' // CHECK-FI

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

2020-01-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236615. njames93 added a comment. adhere to coding guidelines, added check for local volatile qualifiers, disregard pointer addition on function pointer types CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217

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

2020-01-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236617. njames93 added a comment. Added docs for const and volatile qualifiers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72217/new/ https://reviews.llvm.org/D72217 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-

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

2020-01-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/test/clang-tidy/checkers/readability-qualified-auto.cpp:183 + + auto LambdaTest = [] { return 0; }; + // CHECK-MESSAGES-NOT: :[[@LINE-1]]:3: warning: 'auto LambdaTest' can

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

2020-01-07 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236723. njames93 marked an inline comment as done. njames93 added a comment. Added an alias into the llvm module, LMK if I have done that incorrectly 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 updated this revision to Diff 236780. njames93 marked 3 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 clang-tools-extra/clang-tidy/readability/CMak

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

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72217#1809212 , @Eugene.Zelenko wrote: > By the word, will be interesting to see results of this check run on LLVM > code. Probably results should be split on modules. So ran it on clang and clang-tidy just crashed, gonna

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

2020-01-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D72217#1809685 , @njames93 wrote: > In D72217#1809212 , @Eugene.Zelenko > wrote: > > > By the word, will be interesting to see results of this check run on LLVM > > code. Probably resu

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

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

[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 , @n

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

[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: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.c

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

[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 `re

[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] 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()) +re

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

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

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

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

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

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

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

[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 = {""}; CxxC

[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? nop

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

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

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

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

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

[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 cfe-c

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

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

[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"); aar

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

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

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

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

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

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

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

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

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

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

[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 `-checks=somem

[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, hicpp-braces-ar

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

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

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

[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 cfe-commits@li

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

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

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

[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[] = "::std::memcpy

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

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

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

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

[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 ___ cfe

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

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

[PATCH] D87627: [clang-tidy] Fix crash in modernize-use-noexcept on uninstantiated throw class

2020-09-14 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please fix the clang-format fail too. Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-use-noexcept-opt.cpp:23 +// Shouldn't crash due to llvm_unreachable in canThrow() on EST_Uninstantiated +template class c { void *operator new(size

[PATCH] D87683: [clang-tidy] Crash fix for bugprone-misplaced-pointer-arithmetic-in-alloc

2020-09-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please fix the test case first, can't call `operator new(unsigned long, void*)` with an argument of type `void*` The other failures the pre merge bot detected can safely be disregarded Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet, hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman. Herald added a project: clang. njames93 requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Extend the Trivial setter

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 294357. njames93 marked 2 inline comments as done. njames93 added a comment. Updated function doc Fix potential assertion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88297/new/ https://reviews.llvm.org/D8829

[PATCH] D88297: [clangd] Trivial setter support when moving items to fields

2020-09-25 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:461 + if (auto *CE = llvm::dyn_cast(RHS->IgnoreCasts())) { +// Make sure we get the version of move with 1 arg, the other is for moving +// ranges. sammccall wrote: > nit: you

[PATCH] D86176: [clang-tidy] readability-simplify-boolean-expr detects negated literals

2020-08-18 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. njames93 requested review of this revision. Adds support for detecting cases like `if (!true) ...`. Addresses readability-si

[PATCH] D86176: [clang-tidy] readability-simplify-boolean-expr detects negated literals

2020-08-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:66 + if (const auto *Negated = Result.Nodes.getNodeAs(Id)) { +if (Negated->getOpcode() == UO_LNot && +isa(Negated->getSubExpr())) aaron

[PATCH] D86176: [clang-tidy] readability-simplify-boolean-expr detects negated literals

2020-08-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp:66 + if (const auto *Negated = Result.Nodes.getNodeAs(Id)) { +if (Negated->getOpcode() == UO_LNot && +isa(Negated->getSubExpr())) aaron

[PATCH] D86176: [clang-tidy] readability-simplify-boolean-expr detects negated literals

2020-08-22 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf5335a36d3d: [clang-tidy] readability-simplify-boolean-expr detects negated literals (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Can you make sure you upload diffs with full context (-U9). Or using arcanist it will be done automatically. Make sure the diff is up to date with trunk Remove any changes that aren't related to this patch, they just make this look noisy. Repository: rCTE Clan

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:428 case IdentifierNamingCheck::CT_HungarianNotation: { const NamedDecl *pNamedDecl = dyn_cast(pDecl); aaron.ballman wrote: > I feel like I m

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-08-30 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. As Hungarian notation enforces prefixes as well as casing styles it would be wise to warn on cases where the style is Hungarian but a prefix has also been set. Another issue is this current set up will let you define any decls style as hungarian, this doesn't make sen

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-09-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Did you upload this incorrectly again, context is missing and seems to be a relative diff from a previous version of this patch? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86671/new/ https://reviews.llvm.org/D86671 ___

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-09-07 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D86671#2259443 , @dougpuob wrote: > In D86671#2259364 , @njames93 wrote: > >> Did you upload this incorrectly again, context is missing and seems to be a >> relative diff from a previou

[PATCH] D91925: [clangd][NFC] Small tweak to combined provider

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D91925#2439666 , @sammccall wrote: > (I'm not sure how it resolves the problem, but certainly looks nicer!) It's something to do with the derived to base unique_ptr conversion not working properly with NRVO. However removing

[PATCH] D91925: [clangd][NFC] Small tweak to combined provider

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4a0528e4a0e3: [clangd][NFC] Small tweak to combined provider (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D92874: [clangd] Validate clang-tidy Checks in clangd config.

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Add instrumentation in ConfigCompi

[PATCH] D91885: [clang-tidy] Add support for diagnostics with no location

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG27553933a869: [clang-tidy] Add support for diagnostics with no location (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91885/new/ htt

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

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

[PATCH] D92874: [clangd] Validate clang-tidy Checks in clangd config.

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 310352. njames93 added a comment. Made GlobList::specifies const. Made check validation function static and only taking a StringRef. This will make it easier to refactor out at a later date if this functionality wants to be used elsewhere. Repository: r

[PATCH] D92267: [clang-tidy][NFC] Use moves instead of copies when constructing OptionsProviders.

2020-12-08 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 310378. njames93 marked 2 inline comments as done. njames93 added a comment. Use pass by value for FileOptionsBaseProvider constructor. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92267/new/ https://re

[PATCH] D92920: [clang-tidy] Add a diagnostic callback to parseConfiguration

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, gribozavr2. Herald added a subscriber: xazax.hun. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently errors detected when parsing the YAML for

[PATCH] D92920: [clang-tidy] Add a diagnostic callback to parseConfiguration

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 310476. njames93 added a comment. Use MemoryBufferRef instead of StringRef so the Diagnostic can have a meaningful filename. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92920/new/ https://reviews.llvm.org/D

[PATCH] D92788: [clangd] NFC: Use SmallVector where possible

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:100 llvm::StringRef Parent = path::parent_path(P.Path); - llvm::SmallVector Ancestors; for (auto I = path::begin(Parent, path::Style::posix), This should be

[PATCH] D92920: [clang-tidy] Add a diagnostic callback to parseConfiguration

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D92920#2443578 , @aaron.ballman wrote: > Nothing is calling the new `parseConfigurationWithDiags()`, is that > intentional? Also, is there a way to add test coverage for the change? Yes it is intentional, the idea is for pro

[PATCH] D92986: [clangd][NFC] Remove unnecessary vector.

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: kbobyrev, sammccall. Herald added subscribers: usaxena95, kadircet, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. As pointed out in D92788

[PATCH] D92990: [clangd] Provide suggestions with invalid config keys

2020-12-09 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. njames93 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. Update the config file warning whe

[PATCH] D92990: [clangd] Provide suggestions with invalid config keys

2020-12-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 310814. njames93 added a comment. Fix lit test failure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92990/new/ https://reviews.llvm.org/D92990 Files: clang-tools-extra/clangd/ConfigYAML.cpp clang-tools-e

<    2   3   4   5   6   7   8   9   10   11   >