8 Commits

Author SHA1 Message Date
kadir çetinkaya
ec6c3448d3
[include-cleaner] Respect langopts when analyzing macro names (#123634)
Fixes https://github.com/llvm/llvm-project/issues/113926.
Fixes https://github.com/llvm/llvm-project/issues/63976.
2025-01-21 14:48:08 +01:00
Kazu Hirata
88dd981369 [include-cleaner] Remove unused using decls (NFC)
Identified with misc-unused-using-decls.
2023-10-15 00:20:56 -07:00
Kadir Cetinkaya
9b5a934def
[IncludeCleaner][NFC] Dont rely on implicit conversion of StringRef
Fixes https://github.com/llvm/llvm-project/issues/61221
2023-03-14 09:20:30 +01:00
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
Jordan Rupprecht
3432f4bf86 [test] Split out Annotations from TestingSupport
The Annotations helper class does not have a gtest or gmock dependency, but because it's bundled with the rest of TestingSupport, it gets one. By splitting it out, a target can use it without being forced to use LLVM's copy of gtest.

Reviewed By: GMNGeoffrey, sammccall, gribozavr2

Differential Revision: https://reviews.llvm.org/D141175
2023-01-12 13:40:47 -08:00
Kadir Cetinkaya
4764ee6055
[include-cleaner] Use RAV instead of ASTMatchers in LocateSymbolTest
ASTMatchers are pulling in lots of dependencies that we don't really
need for just finding a decl based on name. So use a simple RAV instead.

Differential Revision: https://reviews.llvm.org/D139093
2022-12-01 12:35:34 +01: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