llvm-project/clang/lib/Index
Ben Langmuir 93c87fc06e [index] Improve macro indexing support
The major change here is to index macro occurrences in more places than
before, specifically

* In non-expansion references such as `#if`, `#ifdef`, etc.
* When the macro is a reference to a builtin macro such as __LINE__.
* When using the preprocessor state instead of callbacks, we now include
  all definition locations and undefinitions instead of just the latest
  one (which may also have had the wrong location previously).
* When indexing an existing module file (.pcm), we now include module
  macros, and we no longer report unrelated preprocessor macros during
  indexing the module, which could have caused duplication.

Additionally, we now correctly obey the system symbol filter for macros,
so by default in system headers only definition/undefinition occurrences
are reported, but it can be configured to report references as well if
desired.

Extends FileIndexRecord to support occurrences of macros. Since the
design of this type is to keep a single list of entities organized by
source location, we incorporate macros into the existing DeclOccurrence
struct.

Differential Revision: https://reviews.llvm.org/D99758
2021-04-06 09:12:14 -07:00
..
CMakeLists.txt Index: Remove unused internal header SimpleFormatContext.h, NFC 2020-12-04 15:10:27 -08:00
CommentToXML.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
FileIndexRecord.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
FileIndexRecord.h [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexBody.cpp [clang][index] report references from unreslovedLookupExpr. 2021-02-11 11:08:26 +01:00
IndexDecl.cpp [clangd] Don't traverse the AST within uninteresting files during indexing 2020-05-26 10:27:28 +02:00
IndexSymbol.cpp [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
IndexTypeSourceInfo.cpp [clang] Do not consider the template arguments of bases to be bases themselves 2020-09-01 19:18:03 -04:00
IndexingAction.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexingContext.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexingContext.h [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
USRGeneration.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00