[all-commits] [llvm/llvm-project] 81c330: Filter string_view from the nullptr diagnosis of b...

CJ Johnson via All-commits all-commits at lists.llvm.org
Wed Jan 12 14:04:56 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81c330e23dd4a14736b977e246bdca25be9b5770
      https://github.com/llvm/llvm-project/commit/81c330e23dd4a14736b977e246bdca25be9b5770
  Author: CJ Johnson <johnsoncj at google.com>
  Date:   2022-01-12 (Wed, 12 Jan 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp
    M clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.h

  Log Message:
  -----------
  Filter string_view from the nullptr diagnosis of bugprone-string-constructor to prevent duplicate warnings with bugprone-stringview-nullptr

Updates the check and tests to not diagnose the null case for string_view (but retains it for string). This prevents the check from giving duplicate warnings that are caught by bugprone-stringview-nullptr ([[ https://reviews.llvm.org/D113148 | D113148 ]]).

Reviewed By: ymandel

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




More information about the All-commits mailing list