[all-commits] [llvm/llvm-project] 9edece: [libTooling] Generalize string explanation as temp...

Eric Li via All-commits all-commits at lists.llvm.org
Mon Mar 21 13:39:56 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9edeceaece606125fa392e1648e549d256df423a
      https://github.com/llvm/llvm-project/commit/9edeceaece606125fa392e1648e549d256df423a
  Author: Eric Li <li.zhe.hua at gmail.com>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/abseil/CleanupCtadCheck.cpp
    M clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp
    M clang-tools-extra/clang-tidy/bugprone/StringviewNullptrCheck.cpp
    M clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
    M clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.h
    M clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp
    M clang/include/clang/Tooling/Transformer/RewriteRule.h
    M clang/include/clang/Tooling/Transformer/Transformer.h
    M clang/lib/Tooling/Transformer/RewriteRule.cpp
    M clang/lib/Tooling/Transformer/Transformer.cpp
    M clang/unittests/Tooling/TransformerTest.cpp

  Log Message:
  -----------
  [libTooling] Generalize string explanation as templated metadata

Change RewriteRule from holding an `Explanation` to being able to generate
arbitrary metadata. Where TransformerClangTidyCheck was interested in a string
description for the diagnostic, other tools may be interested in richer metadata
at a higher level of abstraction than at the edit level (which is currently
available as ASTEdit::Metadata).

Reviewed By: ymandel

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




More information about the All-commits mailing list