[clang-tidy] Drop unnecessary const from return types (NFC)

Identified with readability-const-return-type.
This commit is contained in:
Kazu Hirata 2021-09-05 08:37:27 -07:00
parent 1b83aaaefa
commit dfc46f0268
3 changed files with 3 additions and 3 deletions

View file

@ -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)) {

View file

@ -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())

View file

@ -109,7 +109,7 @@ public:
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;