[all-commits] [llvm/llvm-project] b99630: [clang-tidy] Fix RedundantStringCStrCheck with r v...

Nathan James via All-commits all-commits at lists.llvm.org
Wed Jul 29 07:35:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b99630e432614d06b380afb15c466665065eaa0a
      https://github.com/llvm/llvm-project/commit/b99630e432614d06b380afb15c466665065eaa0a
  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




More information about the All-commits mailing list