Skip to content

Commit

Permalink
enabled and mitigated readability-const-return-type clang-tidy warn…
Browse files Browse the repository at this point in the history
…ings (#5644)
  • Loading branch information
firewave committed Nov 24, 2023
1 parent 331db40 commit 86bb7c9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Checks: >
-portability-std-allocator-const,
-readability-avoid-const-params-in-decls,
-readability-braces-around-statements,
-readability-const-return-type,
-readability-container-data-pointer,
-readability-function-cognitive-complexity,
-readability-function-size,
Expand Down
1 change: 0 additions & 1 deletion clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Also reports a false positive about templates which deduce the array length: htt
We run this separately via `clang-include-cleaner` in the `iwyu.yml` workflow as the findings of the include checkers still need to be reviewed manually before applying them.

`bugprone-branch-clone`<br/>
`readability-const-return-type`<br/>
`modernize-return-braced-init-list`<br/>
`misc-throw-by-value-catch-by-reference`<br/>
`readability-avoid-const-params-in-decls`<br/>
Expand Down
2 changes: 1 addition & 1 deletion gui/test/translationhandler/testtranslationhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <QStringList>
#include <QtTest>

static const QStringList getTranslationNames(const TranslationHandler& handler)
static QStringList getTranslationNames(const TranslationHandler& handler)
{
QStringList names;
for (const TranslationInfo& translation : handler.getTranslations()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/standards.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct Standards {
}
return false;
}
const std::string getC() const {
std::string getC() const {
switch (c) {
case C89:
return "c89";
Expand Down
1 change: 1 addition & 0 deletions lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

struct SelectMapKeys {
template<class Pair>
// NOLINTNEXTLINE(readability-const-return-type) - false positive
typename Pair::first_type operator()(const Pair& p) const {
return p.first;
}
Expand Down

0 comments on commit 86bb7c9

Please sign in to comment.