5 Commits

Author SHA1 Message Date
Kadir Cetinkaya
961e32c587
[include-cleaner] Check macros against stdlib database
Differential Revision: https://reviews.llvm.org/D144579
2023-02-23 09:34:37 +01:00
Kadir Cetinkaya
749c6a7083
[include-cleaner] Ranking of providers based on hints
Introduce signals to rank providers of a symbol.

Differential Revision: https://reviews.llvm.org/D139921
2023-01-23 15:22:47 +01:00
Simon Pilgrim
fceec8dcd8 Fix MSVC "not all control paths return a value" warning. NFC. 2022-12-05 10:39:54 +00:00
Kadir Cetinkaya
f82f5b0507
[include-cleaner] Introduce symbol to location mapping
Creates a one to many mapping, by returning all the possible locations
providing a symbol. Also includes an "is definition" signal for the
location, that can be used for ranking afterwards.

This also takes care of stdlib symbols by having a variant of locations.

Depends on D135859.

Differential Revision: https://reviews.llvm.org/D135953
2022-12-01 09:46:05 +01:00
Sam McCall
7943169273 [clang-include-cleaner] make SymbolLocation a real class, move FindHeaders
- replace SymbolLocation std::variant with enum-exposing version similar to
  those in types.cpp. There's no appropriate implementation file, added
  LocateSymbol.cpp in anticipation of locateDecl/locateMacro.
- FindHeaders is not part of the public Analysis interface, so should not
  be implemented/tested there (just code organization)
- rename findIncludeHeaders->findHeaders to avoid confusion with Include concept

Differential Revision: https://reviews.llvm.org/D137825
2022-11-11 13:41:54 +01:00