[all-commits] [llvm/llvm-project] ab090e: [include-cleaner] Make handling of enum constants ...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Mon Aug 28 00:41:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ab090e9e49ff85d031a263abf327e9e436ce3873
      https://github.com/llvm/llvm-project/commit/ab090e9e49ff85d031a263abf327e9e436ce3873
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M clang-tools-extra/include-cleaner/lib/WalkAST.cpp
    M clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp

  Log Message:
  -----------
  [include-cleaner] Make handling of enum constants similar to members

We were treating enum constants more like regular decls, which results
in ignoring type aliases/exports.
This patch brings the handling to be closer to member-like decls, with
one caveat. When we encounter reference to an enum constant we still
report an explicit reference to the particular enum constant, as
otherwise we might not see any references to the enum itself.

Also drops implicit references from qualified names to containers, as
we already have explicit references from the qualifier to relevant
container.

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




More information about the All-commits mailing list