[all-commits] [llvm/llvm-project] eef35c: [clang-tidy]: Add TagDecl into LastTagDeclRanges i...

Qizhi Hu via All-commits all-commits at lists.llvm.org
Wed Oct 4 22:49:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eef35c287ee093b3521c6c2b682d8da538ad28be
      https://github.com/llvm/llvm-project/commit/eef35c287ee093b3521c6c2b682d8da538ad28be
  Author: Qizhi Hu <836744285 at qq.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/modernize/use-using.cpp

  Log Message:
  -----------
  [clang-tidy]: Add TagDecl into LastTagDeclRanges in UseUsingCheck only when it is a definition (#67639)

Fix issue 67529, [clang-tidy: modernize-use-using fails when type is
implicitly forward
declared](https://github.com/llvm/llvm-project/issues/67529)
The problem is that using `Lexer` to get record declaration will lose
the type information when its original type is pointer or reference.
This patch fix this problem by skip adding the tag declaration when it's
only a 'declaration' and not a 'definition'.

Co-authored-by: huqizhi <836744285 at qq.com>




More information about the All-commits mailing list