[all-commits] [llvm/llvm-project] 0e11d6: [clang-tidy] Don't emit misc-unused-using-decl war...

Haojian Wu via All-commits all-commits at lists.llvm.org
Wed Jan 4 01:12:02 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e11d65a58da32311b562ecea2b5ba9d4d655659
      https://github.com/llvm/llvm-project/commit/0e11d65a58da32311b562ecea2b5ba9d4d655659
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2023-01-04 (Wed, 04 Jan 2023)

  Changed paths:
    M clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
    M clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.h
    M clang-tools-extra/docs/clang-tidy/checks/misc/unused-using-decls.rst
    A clang-tools-extra/test/clang-tidy/checkers/misc/unused-using-decls.hxx

  Log Message:
  -----------
  [clang-tidy] Don't emit misc-unused-using-decl warnings for header files.

Using decls in header files are special, usually as part of the
public API, the check should not emit warnings on these.

The check already detects unused using-decls which are in the current main
file, but if the main file happens to be a header file, we still
emit warnings, this patch suppresses that.

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




More information about the All-commits mailing list