[Includecleaner] Introduce RefType to ast walking
authorKadir Cetinkaya <kadircet@google.com>
Mon, 29 Aug 2022 08:34:01 +0000 (10:34 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Tue, 8 Nov 2022 15:29:31 +0000 (16:29 +0100)
commitd19ba74dee0b9ab553bd8a6ef5b67ff349f4bf13
treeb87adf76d1a1bb2deb998fc67eb52e8a86bb99de
parentaa37342b3b548a75a4d8ce330f58a361a9ce22f4
[Includecleaner] Introduce RefType to ast walking

RefTypes are distinct categories for each reference to a symbol. They
are signals indicating strength of a reference, that'll enable different
decision making based on the finding being provided.

There are 3 kinds of ref types:
- Explicit, the reference is spelled in the code.
- Implicit, the reference is not directly visible in the code.
- Ambigious, the reference exists but can't be proven as used (e.g.
  overloads brought in by a using decl but not used by the code).

Differential Revision: https://reviews.llvm.org/D135859
clang-tools-extra/include-cleaner/include/clang-include-cleaner/Analysis.h
clang-tools-extra/include-cleaner/include/clang-include-cleaner/Types.h
clang-tools-extra/include-cleaner/lib/Analysis.cpp
clang-tools-extra/include-cleaner/lib/AnalysisInternal.h
clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
clang-tools-extra/include-cleaner/lib/Record.cpp
clang-tools-extra/include-cleaner/lib/Types.cpp
clang-tools-extra/include-cleaner/lib/WalkAST.cpp
clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp
clang-tools-extra/include-cleaner/unittests/RecordTest.cpp
clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp