Skip to content

Commit

Permalink
[clang-tidy] Drop unnecessary const from return types (NFC)
Browse files Browse the repository at this point in the history
Identified with readability-const-return-type.
  • Loading branch information
kazutakahirata committed Sep 5, 2021
1 parent 1b83aaa commit dfc46f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static bool isSafeAssignment(const FieldDecl *Field, const Expr *Init,
.empty();
}

static const std::pair<const FieldDecl *, const Expr *>
static std::pair<const FieldDecl *, const Expr *>
isAssignmentToMemberOf(const CXXRecordDecl *Rec, const Stmt *S,
const CXXConstructorDecl *Ctor) {
if (const auto *BO = dyn_cast<BinaryOperator>(S)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ bool IdentifierNamingCheck::HungarianNotation::removeDuplicatedPrefix(
return false;
}

const std::string IdentifierNamingCheck::HungarianNotation::getDataTypePrefix(
std::string IdentifierNamingCheck::HungarianNotation::getDataTypePrefix(
StringRef TypeName, const NamedDecl *ND,
const IdentifierNamingCheck::HungarianNotationOption &HNOption) const {
if (!ND || TypeName.empty())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class IdentifierNamingCheck final : public RenamerClangTidyCheck {
const Decl *D,
const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;

const std::string getDataTypePrefix(
std::string getDataTypePrefix(
StringRef TypeName, const NamedDecl *ND,
const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;

Expand Down

0 comments on commit dfc46f0

Please sign in to comment.