[all-commits] [llvm/llvm-project] baf299: [clang-tidy] Fix RedundantStringCStrCheck with r v...
Nathan James via All-commits
all-commits at lists.llvm.org
Wed Jul 29 08:27:04 PDT 2020
Branch: refs/heads/release/11.x
Home: https://github.com/llvm/llvm-project
Commit: baf2999b49c6aff2fcd5448c7d299eb2f4bf8b86
https://github.com/llvm/llvm-project/commit/baf2999b49c6aff2fcd5448c7d299eb2f4bf8b86
Author: Nathan James <n.james93 at hotmail.co.uk>
Date: 2020-07-29 (Wed, 29 Jul 2020)
Changed paths:
M clang-tools-extra/clang-tidy/readability/RedundantStringCStrCheck.cpp
M clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-cstr.cpp
Log Message:
-----------
[clang-tidy] Fix RedundantStringCStrCheck with r values
The previous fix for this, https://reviews.llvm.org/D76761, Passed test cases but failed in the real world as std::string has a non trivial destructor so creates a CXXBindTemporaryExpr.
This handles that shortfall and updates the test case std::basic_string implementation to use a non trivial destructor to reflect real world behaviour.
Reviewed By: gribozavr2
Differential Revision: https://reviews.llvm.org/D84831
(cherry picked from commit b99630e432614d06b380afb15c466665065eaa0a)
More information about the All-commits
mailing list