summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize
Commit message (Collapse)AuthorAgeFilesLines
* NFC: Fix trivial typos in commentsKazuaki Ishizaki2020-01-042-3/+3
|
* [DeclCXX] Remove unknown external linkage specificationsEhud Katz2019-11-211-2/+0
| | | | | | | | | | | | | | | | Partial revert of r372681 "Support for DWARF-5 C++ language tags". The change introduced new external linkage languages ("C++11" and "C++14") which not supported in C++. It also changed the definition of the existing enum to use the DWARF constants. The problem is that "LinkageSpecDeclBits.Language" (the field that reserves this enum) is actually defined as 3 bits length (bitfield), which cannot contain the new DWARF constants. Defining the enum as integer literals is more appropriate for maintaining valid values. Differential Revision: https://reviews.llvm.org/D69935
* [clang-tools-extra] [cmake] Link against libclang-cpp whenever possibleMichal Gorny2019-10-041-1/+1
| | | | | | | | | Use clang_target_link_libraries() in order to support linking against libclang-cpp instead of static libraries. Differential Revision: https://reviews.llvm.org/D68448 llvm-svn: 373786
* [modularize] Fix compilation warning after r372681Mikael Holmen2019-09-241-0/+2
| | | | | | | | | | | | | | | | In r372681 lang_cxx_11 and lang_cxx_14 were added to LanguageIDs but they were not handled in the switch in VisitLinkageSpecDecl in Modularize.cpp so at clang 8 complained with /data/repo/master/clang-tools-extra/modularize/Modularize.cpp:583:13: error: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Werror,-Wswitch] switch (D->getLanguage()) { ^ 1 error generated. With this patch we now treat lang_cxx, lang_cxx_11 and lang_cxx_14 the same way in the switch in VisitLinkageSpecDecl. llvm-svn: 372714
* [Driver] Use shared singleton instance of DriverOptTableIlya Biryukov2019-09-041-3/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This significantly reduces the time required to run clangd tests, by ~10%. Should also have an effect on other tests that run command-line parsing multiple times inside a single invocation. Reviewers: gribozavr, sammccall Reviewed By: sammccall Subscribers: kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67163 llvm-svn: 370908
* Changed FrontendActionFactory::create to return a std::unique_ptrDmitri Gribenko2019-08-292-6/+10
| | | | | | | | | | Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66947 llvm-svn: 370379
* Remove \brief commands from doxygen comments.Dmitri Gribenko2019-08-224-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
* [clang-tools-extra] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-143-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: 368944
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-1/+1
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* [clang-tools-extra] Adopt FileManager's error-returning APIsHarlan Haskins2019-08-011-5/+10
| | | | | | | | The FileManager has been updated to return llvm::ErrorOr from getFile and getDirectory, this commit updates all the callers of those APIs from clang. llvm-svn: 367617
* Simplify with llvm::is_contained. NFCFangrui Song2019-07-131-1/+1
| | | | llvm-svn: 365993
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-199-36/+27
| | | | | | | | | | | | | | | | | 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
* Remove unused c'tor.Bill Wendling2018-11-091-2/+0
| | | | llvm-svn: 346467
* NFC: Enforce good formatting across multiple clang-tools-extra filesKirill Bobyrev2018-08-141-3/+3
| | | | | | | | | | | This patch improves readability of multiple files in clang-tools-extra and enforces LLVM Coding Guidelines. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50707 llvm-svn: 339687
* Reland "[tools] Updating PPCallbacks::InclusionDirective calls"Julie Hockett2018-05-102-3/+5
| | | | | | | | | This commit relands r331905. r331904 added SrcMgr::CharacteristicKind to the InclusionDirective callback, this revision updates instances of it in clang-tools-extra. llvm-svn: 332023
* Revert "[tools] Updating PPCallbacks::InclusionDirective calls"Julie Hockett2018-05-092-5/+3
| | | | | | This reverts commit r331905, since it's dependent on reverted r331905. llvm-svn: 331931
* [tools] Updating PPCallbacks::InclusionDirective callsJulie Hockett2018-05-092-3/+5
| | | | | | | | | [revision] added SrcMgr::CharacteristicKind to the InclusionDirective callback, this revision updates instances of it in clang-tools-extra. Differential Revision: https://reviews.llvm.org/D46615 llvm-svn: 331905
* clang-tidy, modularize: return non-zero exit code on errorsAlexander Kornienko2018-03-221-1/+1
| | | | | | | When no inputs given, the tools should not only produce the help message, but also return a non-zero exit code. Fixed tests accordingly. llvm-svn: 328199
* Revert "[Tooling] [1/1] Refactor FrontendActionFactory::create() to return ↵Roman Lebedev2018-02-272-7/+6
| | | | | | | | | | | | 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-272-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [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
* Support: Have directory_iterator::status() return ↵Peter Collingbourne2017-10-102-9/+12
| | | | | | | | | | | | | | | | | | FindFirstFileEx/FindNextFile results on Windows. This allows clients to avoid an unnecessary fs::status() call on each directory entry. Because the information returned by FindFirstFileEx is a subset of the information returned by a regular status() call, I needed to extract a base class from file_status that contains only that information. On my machine, this reduces the time required to enumerate a ThinLTO cache directory containing 520k files from almost 4 minutes to less than 2 seconds. Differential Revision: https://reviews.llvm.org/D38716 llvm-svn: 315378
* [NFC] Sync function call with changes to interface made in r314593.Faisal Vali2017-09-301-1/+1
| | | | llvm-svn: 314595
* [Support] Rename tool_output_file to ToolOutputFile, NFCReid Kleckner2017-09-231-3/+3
| | | | | | | This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. llvm-svn: 314050
* Update for PrintHelpMessage not calling exit.Rafael Espindola2017-09-081-1/+1
| | | | llvm-svn: 312769
* [NFC] Update function call names as changed in MacroInfo that should refer ↵Faisal Vali2017-07-171-1/+1
| | | | | | | | | | to Parameters (as opposed to Arguments). This syncs them up with clang commit r308190 Thanks! llvm-svn: 308191
* [CMake] Use tools template for clangd and modularizePetr Hosek2017-07-111-1/+1
| | | | | | | | This makes them usable as distribution components in the build. Differential Revision: https://reviews.llvm.org/D35017 llvm-svn: 307601
* Fix memory leak by using unique_ptrDavid Blaikie2017-02-113-11/+11
| | | | llvm-svn: 294823
* Fixes for Clang API changeDavid Blaikie2017-01-062-21/+16
| | | | llvm-svn: 291203
* Deleted unused typedefPiotr Padlewski2016-12-141-1/+0
| | | | llvm-svn: 289658
* modernize-use-auto NFC fixesPiotr Padlewski2016-12-145-63/+38
| | | | llvm-svn: 289656
* Adapt to TraverseLambdaCapture interface change from D23204Martin Bohme2016-08-171-2/+8
| | | | | | | | | | | | | | | Summary: Depends on D23204. This is intended to be submitted immediately after D23204 lands. Reviewers: jdennett, alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23543 llvm-svn: 278934
* Fixed some cases in the modularize assistant mode where header file names ↵John Thompson2016-03-211-1/+14
| | | | | | didn't translate to valid module names. llvm-svn: 264001
* Add qualifiers that are about to be necessary. NFCPaul Robinson2016-02-051-2/+2
| | | | llvm-svn: 259949
* Fix build problem by lower SmallSet<N> to a reasonable valueMatthias Braun2016-02-011-1/+1
| | | | llvm-svn: 259424
* Remove autoconf supportChris Bieneman2016-01-261-24/+0
| | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "Now I am become Death, the destroyer of worlds." -J. Robert Oppenheimer Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D16475 llvm-svn: 258864
* There were problems if a relative path is used for an include path, the path ↵John Thompson2015-12-101-2/+2
| | | | | | will be normalized to ./xxx. I don't know how to test this in a way that will work in a separated source/output environment, but it seems reasonable to assume that -I options won't be for provate directories. llvm-svn: 255199
* Added coverage check for extensionless headers, and exclude hidden dot ↵John Thompson2015-12-042-2/+8
| | | | | | directoryies. llvm-svn: 254785
* Backing out 254635 until I have a good workaround and test case.John Thompson2015-12-041-1/+1
| | | | llvm-svn: 254756
* Fixed header determination logic. Was missing extensionless headers in ↵John Thompson2015-12-031-1/+1
| | | | | | coverage check. llvm-svn: 254635
* modularize: add install ruleSaleem Abdulrasool2015-11-171-0/+4
| | | | | | | This allows modularize to be installed. Previously, no install rule would be created for it. llvm-svn: 253310
* Accommodate interface change in r252134.Alexander Kornienko2015-11-051-1/+2
| | | | llvm-svn: 252138
* Revert "Apply modernize-use-default to clang-tools-extra."David Blaikie2015-10-202-4/+4
| | | | | | | | | Breaks the build in GCC 4.7.2 (see http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3 for example) This reverts commit r250824. llvm-svn: 250862
* Apply modernize-use-default to clang-tools-extra.Angel Garcia Gomez2015-10-202-4/+4
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13889 llvm-svn: 250824
* Make a bunch of static arrays const.Craig Topper2015-10-181-1/+1
| | | | llvm-svn: 250641
* Prune CRLF.NAKAMURA Takumi2015-09-141-2/+2
| | | | llvm-svn: 247541
* Added mechanism to modularize for doing a compilation precheckJohn Thompson2015-07-105-37/+350
| | | | | | | | | | | | to determine files that have comnpilation or dependency problems. A new -display-file-lists option use this to display lists of good files (no compile errors), problem files, and a combined list with problem files preceded by a '#'. The problem files list can be used in the module map generation assistant mode to exclude problem files. The combined files list can be used during module map development. See added docs. llvm-svn: 241880
* Fixed erroneous comments.John Thompson2015-07-081-5/+1
| | | | llvm-svn: 241726
* Fixed erroneous comment.John Thompson2015-07-081-1/+1
| | | | llvm-svn: 241724
OpenPOWER on IntegriCloud