[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added a comment. @jmarrec I believe you wanted to import a discussion from D107900 ? Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp:57 +namespace { +bool isSharedP

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 366456. cjdb marked 9 inline comments as done. cjdb added a comment. - adds user options - removes use of `auto` - fixes header comment - removes unused type - fixes documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-11 Thread Julien Marrec via Phabricator via cfe-commits
jmarrec added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-const-parameter-value-or-ref.rst:90 +Passing a ``shared_ptr`` by reference-to-``const`` is also acceptable in certain +situaitons. As such, ``std::shared_ptr`` and ``boost::shared_pt

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp:57 +namespace { +bool isSharedPtr(const QualType &T) { + if (auto R = T->getAsCXXRecordDecl()) Please use `static`, not anonymous namespace f

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Those CI failures are kinda embarrassing. Is there any way to leverage clang-format in a case like this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107873/new/ https://reviews.llvm.org/D107873

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Work left to do in this patch: add user options. Figured getting a non-config version up for review first would be a good idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107873/new/ https://reviews.llvm.org/D107873 _

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added subscribers: xazax.hun, mgorny. cjdb requested review of this revision. Herald added projects: LLVM, clang-tools-extra. Herald added subscribers: cfe-commits, llvm-commits. Checks ``const``-qualified parameters to deter