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
  • Loading branch information
firewave committed Nov 9, 2023
1 parent b0cde34 commit 0956a56
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
Expand Down
1 change: 0 additions & 1 deletion clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,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
1 change: 1 addition & 0 deletions gui/projectfiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ void ProjectFileDialog::addSingleSuppression(const Suppressions::Suppression &su
void ProjectFileDialog::setSuppressions(const QList<Suppressions::Suppression> &suppressions)
{
mUI->mListSuppressions->clear();
// NOLINTNEXTLINE(readability-const-return-type) - neeeds to be a copy since it might be a reference to mSuppressions
QList<Suppressions::Suppression> new_suppressions = suppressions;
mSuppressions.clear();
for (const Suppressions::Suppression &suppression : new_suppressions) {
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

0 comments on commit 0956a56

Please sign in to comment.