Skip to content

Commit 18929c5

Browse files
committed
Pass SourceLocation by value instead of by const reference since its just a 32-bit integer. NFC
llvm-svn: 248139
1 parent 9cd5e4f commit 18929c5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang-tools-extra/clang-modernize/Core/Transform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Transform::Transform(llvm::StringRef Name, const TransformOptions &Options)
8585
Transform::~Transform() {}
8686

8787
bool Transform::isFileModifiable(const SourceManager &SM,
88-
const SourceLocation &Loc) const {
88+
SourceLocation Loc) const {
8989
if (SM.isWrittenInMainFile(Loc))
9090
return true;
9191

clang-tools-extra/clang-modernize/Core/Transform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Transform {
135135
/// \brief Tests if the file containing \a Loc is allowed to be modified by
136136
/// the Modernizer.
137137
bool isFileModifiable(const clang::SourceManager &SM,
138-
const clang::SourceLocation &Loc) const;
138+
clang::SourceLocation Loc) const;
139139

140140
/// \brief Whether a transformation with a risk level of \p RiskLevel is
141141
/// acceptable or not.

clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ std::string joinParameterNames(
203203

204204
void formatDifferingParamsDiagnostic(
205205
InconsistentDeclarationParameterNameCheck *Check,
206-
const SourceLocation &Location, StringRef OtherDeclarationDescription,
206+
SourceLocation Location, StringRef OtherDeclarationDescription,
207207
const DifferingParamsContainer &DifferingParams) {
208208
auto ChooseOtherName =
209209
[](const DifferingParamInfo &ParamInfo) { return ParamInfo.OtherName; };

0 commit comments

Comments
 (0)