summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexingAction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [NFC] Fix typos in Clangd and ClangKirill Bobyrev2019-12-161-1/+1
| | | | | | Reviewed by: Jim Differential Revision: https://reviews.llvm.org/D71455
* [Index] Added a ShouldSkipFunctionBody callback to libIndex, and refactored ↵Dmitri Gribenko2019-08-291-9/+18
| | | | | | | | | | | | clients to use it instead of inventing their own solution Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66879 llvm-svn: 370338
* [Index] Stopped wrapping FrontendActions in libIndex and its usersDmitri Gribenko2019-08-291-48/+14
| | | | | | | | | Exposed a new function, createIndexingASTConsumer, that creates an ASTConsumer. ASTConsumers compose well. Removed wrapping functionality from createIndexingAction. llvm-svn: 370337
* [Index] Moved the IndexDataConsumer::finish call into the IndexASTConsumer ↵Dmitri Gribenko2019-08-291-32/+24
| | | | | | | | | from IndexAction Doing so removes the last reason to expose a FrontendAction from libIndex. llvm-svn: 370336
* [Index] Create PP callbacks in the ASTConsumerDmitri Gribenko2019-08-291-45/+31
| | | | | | | | Doing so removes one reason to create a custom FrontendAction. FrontendActions are not desirable because they are difficult to compose. ASTConsumers are much easier to compose. llvm-svn: 370323
* [Index] Marked a bunch of classes 'final'Dmitri Gribenko2019-08-291-4/+4
| | | | | | | This file defines multiple inheritance hierarchies and 'final' helps with readability. llvm-svn: 370321
* [clang][Index][NFC] Move IndexDataConsumer default implementationJan Korous2019-08-271-21/+0
| | | | llvm-svn: 370116
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-6/+6
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [index] Enhance indexing for module referencesArgyrios Kyrtzidis2018-09-181-0/+1
| | | | | | | * Create a USR for the occurrences of the 'module' symbol kind * Record module references for each identifier in an import declaration llvm-svn: 342484
* [Index] Add an option to collect macros from preprocesor.Eric Liu2018-09-181-1/+22
| | | | | | | | | | | | | | Summary: Also added unit tests for the index library; lit+c-index-test is painful... Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D52098 llvm-svn: 342451
* [Index] Ignore noop #undef's when handling macro occurrences.Eric Liu2018-07-091-0/+2
| | | | llvm-svn: 336584
* [Index] Add indexing support for MACROs.Eric Liu2018-07-091-34/+82
| | | | | | | | | | | | Reviewers: akyrtzi, arphaman, sammccall Reviewed By: sammccall Subscribers: malaperle, sammccall, cfe-commits Differential Revision: https://reviews.llvm.org/D48961 llvm-svn: 336524
* [Index] Remove unused index::IndexDataConsumer::_anchor()Fangrui Song2018-07-051-2/+0
| | | | | | It was supposed to serve as a key function, but it was invalid as it was not the first out-of-line non-pure virtual function. llvm-svn: 336300
* [index] Fix methods that take a shared_ptr to just take a reference.Benjamin Kramer2018-04-231-16/+14
| | | | | | | There is no ownership here, passing a shared_ptr just adds confusion. No functionality change intended. llvm-svn: 330595
* [Index] Return SourceLocation to consumers, not FileID/Offset pair.Sam McCall2018-04-091-4/+5
| | | | | | | | | | | | | | | | | | Summary: The FileID/Offset conversion is lossy. The code takes the fileLoc, which loses e.g. the spelling location in some macro cases. Instead, pass the original SourceLocation which preserves all information, and update consumers to match current behavior. This allows us to fix two bugs in clangd that need the spelling location. Reviewers: akyrtzi, arphaman Subscribers: ilya-biryukov, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D45014 llvm-svn: 329570
* [Index] Add setPreprocessor member to IndexDataConsumer.Eric Liu2017-12-071-8/+14
| | | | | | | | | | | | | | | | Summary: This enables us to use information in Preprocessor when handling symbol occurrences. Reviewers: arphaman, hokein Reviewed By: hokein Subscribers: malaperle, cfe-commits Differential Revision: https://reviews.llvm.org/D40884 llvm-svn: 320030
* [index] Added a method indexTopLevelDecls to run indexing on a list of Decls.Ilya Biryukov2017-07-141-0/+12
| | | | | | | | | | | | | | | | Summary: We need it in clangd for refactoring that replaces ASTUnit with manual AST management. Reviewers: akyrtzi, benlangmuir, arphaman, klimek Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D35405 llvm-svn: 308016
* [c-index-test] Provide capability to index module file imports and dump ↵Argyrios Kyrtzidis2017-01-301-0/+17
| | | | | | | | their input files. This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. llvm-svn: 293461
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-141-0/+2
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* [index] Allow calling createIndexingAction() without passing another action ↵Argyrios Kyrtzidis2016-02-141-22/+56
| | | | | | to wrap over. llvm-svn: 260841
* [libclang] Separate the underlying indexing functionality of libclang and ↵Argyrios Kyrtzidis2016-02-121-0/+140
introduce it into the clangIndex library. It is a general goodness for libclang itself to mostly be a wrapper of functionality provided by the libraries. llvm-svn: 260760
OpenPOWER on IntegriCloud