summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/include-fixer/find-all-symbols
Commit message (Collapse)AuthorAgeFilesLines
* Rename directory housing clang-include-fixer to be eponymousNico Weber2019-03-2521-2118/+0
| | | | | | | | | | | Makes the name of this directory consistent with the names of the other directories in clang-tools-extra. Similar to r356254. No intended behavior change. Differential Revision: https://reviews.llvm.org/D59750 llvm-svn: 356897
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1919-76/+57
| | | | | | | | | | | | | | | | | 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
* Add explicit dependency on clangSerialization after rC348911Fangrui Song2018-12-121-0/+1
| | | | llvm-svn: 348916
* Revert "[Tooling] [1/1] Refactor FrontendActionFactory::create() to return ↵Roman Lebedev2018-02-271-2/+2
| | | | | | | | | | | | std::unique_ptr<>" This reverts commit rL326202 This broke gcc4.8 builds, compiler just segfaults: http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/14909 http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/22673 llvm-svn: 326203
* [Tooling] [1/1] Refactor FrontendActionFactory::create() to return ↵Roman Lebedev2018-02-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | std::unique_ptr<> Summary: I'm not sure whether there are any principal reasons why it returns raw owning pointer, or it is just a old code that was not updated post-C++11. I'm not too sure what testing i should do, because `check-all` is not error clean here for some reason, but it does not //appear// asif those failures are related to these changes. This is Clang-tools-extra part. Clang part is D43779. Reviewers: klimek, bkramer, alexfh, pcc Reviewed By: alexfh Subscribers: ioeric, jkorous-apple, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D43780 llvm-svn: 326202
* [include-fixer] Add more debug headers to the STL header listBenjamin Kramer2018-02-151-0/+4
| | | | | | These are used for std::map/std::set in STL debug mode. llvm-svn: 325298
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
* [FindAllSymbols] Cache regexes, creating them is expensiveBenjamin Kramer2017-11-223-15/+27
| | | | | | | | This is a bit annoying because LLVM regexes are always mutable to store errors. Assert that there are never errors and fix broken hardcoded regexes. llvm-svn: 318840
* Adapt clang-tidy checks to changing semantics of hasDeclaration.Manuel Klimek2017-08-021-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D36154 llvm-svn: 309810
* Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTORRichard Smith2017-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is a short-term fix for PR33650 aimed to get the modules build bots green again. Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR macros to try to locally specialize a global template for a global type. That's not how C++ works. Instead, we now centrally define how to format vectors of fundamental types and of string (std::string and StringRef). We use flow formatting for the former cases, since that's the obvious right thing to do; in the latter case, it's less clear what the right choice is, but flow formatting is really bad for some cases (due to very long strings), so we pick block formatting. (Many of the cases that were using flow formatting for strings are improved by this change.) Other than the flow -> block formatting change for some vectors of strings, this should result in no functionality change. Differential Revision: https://reviews.llvm.org/D34907 Corresponding LLVM change is r306878. llvm-svn: 306879
* Revert "[include-fixer] Don't throw exception when parsing unknown arguments ↵Benjamin Kramer2017-05-171-1/+1
| | | | | | | | | in vim script." This reverts commit r302934. It's wrong, edits the wrong file and was committed without review. llvm-svn: 303242
* [include-fixer] Don't throw exception when parsing unknown arguments inHaojian Wu2017-05-121-1/+1
| | | | | | vim script. llvm-svn: 302934
* [include-fixer] Remove line number from Symbol identitySam McCall2017-03-094-26/+18
| | | | | | | | | | | | | | | | | | | Summary: Remove line number from Symbol identity. For our purposes (include-fixer and clangd autocomplete), function overloads within the same header should mostly be treated as a single combined symbol. We may want to track individual occurrences (line number, full type info) and aggregate this during mapreduce, but that's not done here. Reviewers: hokein, bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30685 llvm-svn: 297371
* [find-all-symbols] Implement operator== for SymbolAndSignals and ↵Haojian Wu2017-02-282-0/+10
| | | | | | SymbolInfo::Signals. llvm-svn: 296461
* [include-fixer] Add usage count to find-all-symbols.Sam McCall2017-02-289-119/+229
| | | | | | | | | | | | | | | | | | | | | | | Summary: Add usage count to find-all-symbols. FindAllSymbols now finds (most!) main-file usages of the discovered symbols. The per-TU map output has NumUses=0 or 1 (only one use per file is counted). The reducer aggregates these to find the number of files that use a symbol. The NumOccurrences is now set to 1 in the mapper rather than being inferred by the reducer, for consistency. The idea here is to use NumUses for ranking: intuitively number of files that use a symbol is more meaningful than number of files that include the header. Reviewers: hokein, bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30210 llvm-svn: 296446
* [find-all-symbols] Index partial template specializations.Haojian Wu2017-01-111-4/+14
| | | | | | | | | | | | | | | Summary: Fix no std::function index. Previously, we don't index all the template specialization declarations of functions and classes (Because we assume that template functions/classes are indexed by their template declarations), but this is not always true in some cases like `std::function` which only has a partial template specialization declaration. Reviewers: ioeric, bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27920 llvm-svn: 291669
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-141-1/+1
| | | | llvm-svn: 289656
* [include-fixer] Support finding headers for the symbol under cursor.Haojian Wu2016-09-071-0/+2
| | | | | | | | | | | | | | Summary: * Add a `query-symbol` option to query symbol without parsing the source file. * Update Vim & Emacs integration scripts. Reviewers: bkramer, massberg Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24075 llvm-svn: 280824
* [include-fixer] Fix some Clang-tidy modernize-use-override and Include What ↵Eugene Zelenko2016-09-062-3/+9
| | | | | | | | You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24179 llvm-svn: 280741
* Revert "Revert "[Include-fixer] Install executables and support scripts""Zachary Turner2016-08-171-2/+11
| | | | | | | | | This reverts commit 2aff596257e1c45fa54baae823ecbe61a785174e. I'm having a bad day apparently. I reverted the wrong CL. This puts it back. llvm-svn: 278978
* Revert "[Include-fixer] Install executables and support scripts"Zachary Turner2016-08-171-11/+2
| | | | | | | | | This reverts commit b725a314a9b7f746c37f70909ec3c4dcb6d9f6b5. The patch that made this test work needed to be reverted, so this test needs to be reverted as well. llvm-svn: 278977
* [Include-fixer] Install executables and support scriptsEugene Zelenko2016-08-171-2/+11
| | | | | | Differential revision: https://reviews.llvm.org/D23045 llvm-svn: 278949
* [include-fixer] Correct some header mappings.Haojian Wu2016-08-051-8/+8
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23199 llvm-svn: 277811
* [include-fixer] Add missing namespace qualifiers after inserting a missing ↵Haojian Wu2016-07-082-0/+13
| | | | | | | | | | | | | | | | | | | | | | | header. Summary: This is an initial version of fixing namespace issues by adding missing namespace qualifiers to an unidentified symbol. This version only fixes the first discovered unidentified symbol. In the long run, include-fixer should fix all unidentified symbols with a same name at one run. Currently, it works on command-line tool. The vim integration is not implemented yet. Reviewers: klimek, bkramer, djasper Subscribers: bkramer, ioeric, cfe-commits Differential Revision: http://reviews.llvm.org/D21603 llvm-svn: 274832
* [include-fixer] reduce stack size by changing RegexHeaderMap to use const ↵Eric Liu2016-07-041-2/+1
| | | | | | char * pair. llvm-svn: 274501
* Fix broken build caused by r274494.Eric Liu2016-07-041-0/+1
| | | | llvm-svn: 274495
* [include-fixer] make HeaderMapCollector maps from regex instead of postfix.Eric Liu2016-07-046-651/+654
| | | | | | | | | | | | | | Summary: this enables us to map a group of headers to one header name, e.g. headers from one directory can be mapped to the same header. Reviewers: bkramer Subscribers: cfe-commits, hokein Differential Revision: http://reviews.llvm.org/D21787 llvm-svn: 274494
* [include-fixer] Correct two wrong header mappings.Haojian Wu2016-06-151-2/+2
| | | | | | | | | | Reviewers: bkramer Subscribers: ioeric, cfe-commits Differential Revision: http://reviews.llvm.org/D21371 llvm-svn: 272773
* [include-fixer] do not index friend function declaration.Eric Liu2016-06-091-3/+8
| | | | | | | | | | | | | | | Summary: we want to exclude friend declaration, but the `DeclContext` of a friend function declaration is not the class in which it is declared, so we need to explicitly check if the parent is a `friendDecl`. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21175 llvm-svn: 272261
* [include-fixer] Keep dot dot in SymbolInfo file paths.Haojian Wu2016-06-082-3/+2
| | | | | | | | | | | | | | | | | | Summary: Currently, removing dot dot in header's path doesn't make include-fixer minimize path correctly in some cases, for example, specify a relative search path based on the build directory("-I../include/"). Besides, removing dot dot can break symbolic link directories. So don't removing it for now. Reviewers: ioeric, bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21132 llvm-svn: 272152
* [include-fixer] do not add enum forward declaration into symbol index table.Eric Liu2016-06-081-4/+4
| | | | llvm-svn: 272132
* [include-fixer] fixed a wrong header mapping.Eric Liu2016-06-031-1/+1
| | | | llvm-svn: 271638
* [include-fixer] added GNU symbols hardcoded header mapping.Eric Liu2016-06-031-26/+316
| | | | | | | | | | | | Summary: [include-fixer] added GNU symbols hardcoded header mapping. Reviewers: klimek, bkramer Subscribers: cfe-commits, hokein Differential Revision: http://reviews.llvm.org/D20902 llvm-svn: 271637
* [include-fixer] use includer of .inc header to be the file path of a symbol ↵Eric Liu2016-06-015-22/+88
| | | | | | | | | | | | | | from .inc header. Summary: added PathConfig.cpp and use includer of .inc header to be the file path of a symbol from .inc header. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20855 llvm-svn: 271385
* [find-all-symbols] remove dots in SymbolInfo file paths.Eric Liu2016-05-312-2/+9
| | | | | | | | | | | | Summary: remove dots in SymbolInfo file paths. Reviewers: bkramer, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20819 llvm-svn: 271302
* [include-fixer] Inline trivial methods.Benjamin Kramer2016-05-312-20/+8
| | | | | | | Putting them into the .cpp file is both more verbose and slower than having them in the header. No functional change intended. llvm-svn: 271285
* [include-fixer] collect the number of times a symbols is found in an ↵Eric Liu2016-05-313-6/+26
| | | | | | | | | | | | | | | | indexing run and use it for symbols popularity ranking. Summary: [include-fixer] collect the number of times a symbols is found in an indexing run and use it for symbols popularity ranking. Reviewers: bkramer Subscribers: cfe-commits, hokein, djasper Differential Revision: http://reviews.llvm.org/D20804 llvm-svn: 271268
* [include-fixer] Add a missing .h.Benjamin Kramer2016-05-271-1/+1
| | | | llvm-svn: 270989
* [include-fixer] /usr/include/xlocal.h to include/xlocal.h in hardcoded map.Eric Liu2016-05-251-1/+1
| | | | llvm-svn: 270703
* Include local header with quotes instead of angle brackets.Benjamin Kramer2016-05-251-1/+1
| | | | | | This works by accident because we pass '-I.' llvm-svn: 270701
* [include-fixer] moved STLPostfixMap into findAllSymbols library and make it ↵Eric Liu2016-05-256-364/+364
| | | | | | | | | | | | | | a static variable in function. Summary: [include-fixer] moved STLPostfixMap into findAllSymbols library and make it a static variable in function. Reviewers: bkramer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20619 llvm-svn: 270696
* [include-fixer][find-all-symbols] added missing dependencies.Eric Liu2016-05-241-0/+2
| | | | llvm-svn: 270578
* [include-fixer][find-all-symbols] removed unused const member from ↵Eric Liu2016-05-241-2/+0
| | | | | | YamlReporter to fix build bot failure. llvm-svn: 270571
* [find-all-symbols] Added hardcode header mapping from header postfix to ↵Eric Liu2016-05-2411-56/+551
| | | | | | | | | | | | | | header name for STL symbols. Summary: [find-all-symbols] Added hardcode header mapping from header postfix to header name for STL symbols. Reviewers: klimek, bkramer Subscribers: cfe-commits, hokein Differential Revision: http://reviews.llvm.org/D20566 llvm-svn: 270566
* [find-all-symbol] Ignore inline namespace context.Haojian Wu2016-05-201-3/+3
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits, ioeric Differential Revision: http://reviews.llvm.org/D20465 llvm-svn: 270206
* [find-all-symbols] fix failing unittest for Windows build bot.Eric Liu2016-05-201-3/+2
| | | | llvm-svn: 270202
* [find-all-symbols] fixed FindAllMacros compilation error.Eric Liu2016-05-201-1/+1
| | | | llvm-svn: 270196
* [find-all-symbols] make HeaderMapCollector optional in FindAllSymbols and ↵Eric Liu2016-05-205-18/+21
| | | | | | FindAllMacros. llvm-svn: 270193
* [find-all-symbol] Add macro support.Haojian Wu2016-05-209-18/+141
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits, ioeric Differential Revision: http://reviews.llvm.org/D20420 llvm-svn: 270189
* findAllSymbols: Prune unused libdeps.NAKAMURA Takumi2016-05-181-3/+0
| | | | llvm-svn: 269875
OpenPOWER on IntegriCloud