Commit dfc46f02 authored by Kazu Hirata's avatar Kazu Hirata
Browse files

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

Identified with readability-const-return-type.
parent 1b83aaae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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())
+1 −1
Original line number Diff line number Diff line
@@ -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;