[all-commits] [llvm/llvm-project] 7c9066: [clang-tidy] readability-redundant-string-init now...

Nathan James via All-commits all-commits at lists.llvm.org
Mon Jan 27 15:51:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c90666d2c3cfb5a519275d89195be317e7cc0ab
      https://github.com/llvm/llvm-project/commit/7c90666d2c3cfb5a519275d89195be317e7cc0ab
  Author: Nathan <n.james93 at hotmail.co.uk>
  Date:   2020-01-27 (Mon, 27 Jan 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability-redundant-string-init.cpp

  Log Message:
  -----------
  [clang-tidy] readability-redundant-string-init now flags redundant initialisation in Field Decls and Constructor Initialisers

Summary:
The original behaviour of this check only looked at VarDecls with strings that had an empty string initializer. This has been improved to check for FieldDecls with an in class initializer as well as constructor initializers.

Addresses [[ https://bugs.llvm.org/show_bug.cgi?id=44474 | clang-tidy "modernize-use-default-member-init"/"readability-redundant-string-init" and redundant initializer of std::string ]]

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: merge_guards_bot, mgorny, Eugene.Zelenko, xazax.hun, cfe-commits

Tags: #clang, #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D72448




More information about the All-commits mailing list