summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2019-05-23 02:52:39 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2019-05-23 02:52:39 +0000
commit3d68a38be8d28e25160ff90ff9f35bee61173186 (patch)
treee0e940da6c215f21fabdec46721f8c2598a1f83f /clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp
parenta86c889f051267b69621d15848deaae3928bca90 (diff)
downloadbcm5719-llvm-3d68a38be8d28e25160ff90ff9f35bee61173186.tar.gz
bcm5719-llvm-3d68a38be8d28e25160ff90ff9f35bee61173186.zip
Remove unnecessary const&s; NFC
It's uncommon to rely on temporary lifetime extension when having a regular, non-`const&` value behaves identically. Since `Twine::str` and `buildFixMsgForStringFlag` both return regular `std::string`s, there's seemingly no point in having `const&` here. llvm-svn: 361457
Diffstat (limited to 'clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp b/clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp
index 9a676d1498c..1f068d49f77 100644
--- a/clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp
+++ b/clang-tools-extra/clang-tidy/android/CloexecDupCheck.cpp
@@ -23,7 +23,7 @@ void CloexecDupCheck::registerMatchers(MatchFinder *Finder) {
}
void CloexecDupCheck::check(const MatchFinder::MatchResult &Result) {
- const std::string &ReplacementText =
+ std::string ReplacementText =
(Twine("fcntl(") + getSpellingArg(Result, 0) + ", F_DUPFD_CLOEXEC)")
.str();
OpenPOWER on IntegriCloud