diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2019-05-23 02:52:39 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2019-05-23 02:52:39 +0000 |
commit | 3d68a38be8d28e25160ff90ff9f35bee61173186 (patch) | |
tree | e0e940da6c215f21fabdec46721f8c2598a1f83f /clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp | |
parent | a86c889f051267b69621d15848deaae3928bca90 (diff) | |
download | llvm-3d68a38be8d28e25160ff90ff9f35bee61173186.zip llvm-3d68a38be8d28e25160ff90ff9f35bee61173186.tar.gz llvm-3d68a38be8d28e25160ff90ff9f35bee61173186.tar.bz2 |
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/CloexecAcceptCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp b/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp index b26ad75..b79c554 100644 --- a/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp +++ b/clang-tools-extra/clang-tidy/android/CloexecAcceptCheck.cpp @@ -29,7 +29,7 @@ void CloexecAcceptCheck::registerMatchers(MatchFinder *Finder) { } void CloexecAcceptCheck::check(const MatchFinder::MatchResult &Result) { - const std::string &ReplacementText = + std::string ReplacementText = (Twine("accept4(") + getSpellingArg(Result, 0) + ", " + getSpellingArg(Result, 1) + ", " + getSpellingArg(Result, 2) + ", SOCK_CLOEXEC)") |