[clang-tools-extra] r248139 - Pass SourceLocation by value instead of by const reference since its just a 32-bit integer. NFC
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 18:33:03 PDT 2015
Author: ctopper
Date: Sun Sep 20 20:33:03 2015
New Revision: 248139
URL: http://llvm.org/viewvc/llvm-project?rev=248139&view=rev
Log:
Pass SourceLocation by value instead of by const reference since its just a 32-bit integer. NFC
Modified:
clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp
clang-tools-extra/trunk/clang-modernize/Core/Transform.h
clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
Modified: clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp?rev=248139&r1=248138&r2=248139&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp Sun Sep 20 20:33:03 2015
@@ -85,7 +85,7 @@ Transform::Transform(llvm::StringRef Nam
Transform::~Transform() {}
bool Transform::isFileModifiable(const SourceManager &SM,
- const SourceLocation &Loc) const {
+ SourceLocation Loc) const {
if (SM.isWrittenInMainFile(Loc))
return true;
Modified: clang-tools-extra/trunk/clang-modernize/Core/Transform.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/Transform.h?rev=248139&r1=248138&r2=248139&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/Core/Transform.h (original)
+++ clang-tools-extra/trunk/clang-modernize/Core/Transform.h Sun Sep 20 20:33:03 2015
@@ -135,7 +135,7 @@ public:
/// \brief Tests if the file containing \a Loc is allowed to be modified by
/// the Modernizer.
bool isFileModifiable(const clang::SourceManager &SM,
- const clang::SourceLocation &Loc) const;
+ clang::SourceLocation Loc) const;
/// \brief Whether a transformation with a risk level of \p RiskLevel is
/// acceptable or not.
Modified: clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp?rev=248139&r1=248138&r2=248139&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp Sun Sep 20 20:33:03 2015
@@ -203,7 +203,7 @@ std::string joinParameterNames(
void formatDifferingParamsDiagnostic(
InconsistentDeclarationParameterNameCheck *Check,
- const SourceLocation &Location, StringRef OtherDeclarationDescription,
+ SourceLocation Location, StringRef OtherDeclarationDescription,
const DifferingParamsContainer &DifferingParams) {
auto ChooseOtherName =
[](const DifferingParamInfo &ParamInfo) { return ParamInfo.OtherName; };
More information about the cfe-commits
mailing list