summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[clang][clang-scan-deps] Add support for extracting full module ↵Michael Spencer2019-10-301-12/+1
| | | | | | | | dependencies." This reverts commit d8a4ef0e685cec1fc73d4953b48220b649d05b40. This commit broke some of the bots. I believe it's due to nondeterminism. Will fix and recommit.
* [clang][clang-scan-deps] Add support for extracting full module dependencies.Michael Spencer2019-10-301-1/+12
| | | | | | | | | This adds experimental support for extracting a Clang module dependency graph from a compilation database. The output format is experimental and will change. It is currently a concatenation of JSON outputs for each compilation. Future patches will change this to deduplicate modules between compilations. Differential Revision: https://reviews.llvm.org/D69420
* Revert "[NFC] Rename LLVM_NO_DEAD_STRIP"David Tenty2019-10-301-2/+2
| | | | This reverts commit 11c2a85db8849db1a5907e80d9966592248ef825.
* [OPENMP50]Add support for parallel master taskloop simd directive.Alexey Bataev2019-10-302-0/+12
| | | | Added full support for parallel master taskloop simd directive.
* Revert "[clang-format] Remove the dependency on frontend"Vlad Tsyrklevich2019-10-292-26/+15
| | | | | | This reverts commit ec66603ac7ea655be5c2c5f508c5bf0d5eaeb65b. It was causing ubsan failures like the following on the ubsan bot: llvm/lib/Support/SourceMgr.cpp:440:48: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xfffffffffffffffa
* Reland "[Clang][Bundler] Error reporting improvements"Sergey Dmitriev2019-10-251-196/+213
| | | | | | | | - Changed FileHandler read/write methods to return llvm::Error - Using unified way of reporting errors - Removed trailing '.' from the error messages Differential Revision: https://reviews.llvm.org/D67031
* Revert "[Clang][Bundler] Error reporting improvements"Sergey Dmitriev2019-10-251-213/+196
| | | | This reverts commit dd501045cdea1c80b6788f0266d2a79f8b412eea.
* [Clang][Bundler] Error reporting improvementsSergey Dmitriev2019-10-251-196/+213
| | | | | | | | - Changed FileHandler read/write methods to return llvm::Error - Using unified way of reporting errors - Removed trailing '.' from the error messages Differential Revision: https://reviews.llvm.org/D67031
* [NFC] Rename LLVM_NO_DEAD_STRIPDavid Tenty2019-10-251-2/+2
| | | | | | | | | | | | | | | | | Summary: The variable LLVM_NO_DEAD_STRIP is set in LLVM cmake files when building executables that might make use of plugins .The name of the variable does not convey the actual intended usage (i.e. for use with tools that have plugins), just what the eventual effect of setting in on some (i.e. not garbage collecting unused symbols). This patch renames it to LLVM_SUPPORT_PLUGINS to convey the intended usage, which will allow subsequent patches to add behavior to support that in different ways without confusion about whether it will do on, for example, non-gnu platforms. Reviewers: hubert.reinterpretcast, stevewan Reviewed By: stevewan Subscribers: cfe-commits, mgorny, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D69356
* [clang-format] Remove duplciate code from Invalid BOM detectionpaulhoad2019-10-241-26/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: Review comments on {D68767} asked that this duplicated code in clang-format was moved to one central location that being SourceManager (where it had originally be copied from I assume) Moved function into static function ContentCache::getInvalidBOM(...) - (closest class to where it was defined before) Updated clang-format to call this static function Added unit tests for said new function in BasicTests Sorry not my normal code area so may have the wrong reviewers. (but your names were on the recent history) Reviewers: bruno, arphaman, klimek, owenpan, mitchell-stellar, dexonsmith Reviewed By: owenpan Subscribers: cfe-commits Tags: #clang, #clang-format, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D68914
* [clang-format] Remove the dependency on frontendpaulhoad2019-10-242-15/+26
| | | | | | | | | | | | | | | | | | | Summary: Address review comments from {D68554} by trying to drop the dependency again on Frontend whilst keeping the same format diagnostic messages Not completely happy with having to do a split in order to get the StringRef for the Line the error occurred on, but could see a way to use SourceManager and SourceLocation to give me a single line? But this removes the dependency on frontend which should keep the binary size down. Reviewers: thakis, klimek, mitchell-stellar Reviewed By: klimek Subscribers: mgorny, cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D68969
* Reland "[Support] Add a way to run a function on a detached thread""Sam McCall2019-10-231-1/+3
| | | | | This reverts commit 7bc7fe6b789d25d48d6dc71d533a411e9e981237. The immediate callers have been fixed to pass nullopt where appropriate.
* [Mips] Use appropriate private label prefix based on Mips ABIMirko Brkusanin2019-10-231-2/+3
| | | | | | | | | | MipsMCAsmInfo was using '$' prefix for Mips32 and '.L' for Mips64 regardless of -target-abi option. By passing MCTargetOptions to MCAsmInfo we can find out Mips ABI and pick appropriate prefix. Tags: #llvm, #clang, #lldb Differential Revision: https://reviews.llvm.org/D66795
* [clang-fuzzer] Update proto fuzzer example for r375453.Benjamin Kramer2019-10-221-1/+1
| | | | llvm-svn: 375487
* Refactor DependencyScanningTool to its own fileKousik Kumar2019-10-221-98/+27
| | | | | | | | | | | | | | | | | Summary: There's no behavior change - just moving DependencyScanningTool to its own file since this tool can be reused across both clang-scan-deps binary and an interface exposed as part of libClang APIs. Reviewers: arphaman, jkorous, Bigcheese, dexonsmith Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69186 llvm-svn: 375483
* [clang-fuzzer] Add new fuzzer target for Objective-CDavid Goldman2019-10-2111-7/+185
| | | | | | | | | | | | | | | | | Summary: - Similar to that of `clang-fuzzer` itself but instead only targets Objective-C source files via cc1 - Also adds an example corpus directory containing some input for Objective-C Subscribers: mgorny, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69171 llvm-svn: 375453
* [c++20] Add CXXRewrittenBinaryOperator to represent a comparisonRichard Smith2019-10-191-0/+1
| | | | | | | | operator that is rewritten as a call to multiple other operators. No functionality change yet: nothing creates these expressions. llvm-svn: 375305
* [OPENMP50]Add support for master taskloop simd.Alexey Bataev2019-10-182-0/+12
| | | | | | Added trsing/semantics/codegen for combined construct master taskloop simd. llvm-svn: 375255
* Replace platform-dependent `stat` with `llvm::sys::fs::status`. NFC intended.Volodymyr Sapsai2019-10-161-2/+2
| | | | | | | | | | | | Reviewers: bruno, sammccall Reviewed By: sammccall Subscribers: jkorous, dexonsmith, arphaman, ributzka, cfe-commits Differential Revision: https://reviews.llvm.org/D69011 llvm-svn: 375031
* [Clang][OpenMP Offload] Move offload registration code to the wrapperSergey Dmitriev2019-10-151-56/+231
| | | | | | | | | | The final list of OpenMP offload targets becomes known only at the link time and since offload registration code depends on the targets list it makes sense to delay offload registration code generation to the link time instead of adding it to the host part of every fat object. This patch moves offload registration code generation from clang to the offload wrapper tool. This is the last part of the OpenMP linker script elimination patch https://reviews.llvm.org/D64943 Differential Revision: https://reviews.llvm.org/D68746 llvm-svn: 374937
* [Concepts] Concept Specialization ExpressionsSaar Raz2019-10-151-0/+1
| | | | | | | | | | Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is refe$ D41217 on Phabricator. (recommit after fixing failing Parser test on windows) llvm-svn: 374903
* Revert 374882 "[Concepts] Concept Specialization Expressions"Nico Weber2019-10-151-1/+0
| | | | | | | | | | This reverts commit ec87b003823d63f3342cf648f55a134c1522e612. The test fails on Windows, see e.g. http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/11533/steps/stage%201%20check/logs/stdio Also revert follow-up r374893. llvm-svn: 374899
* [Concepts] Concept Specialization ExpressionsSaar Raz2019-10-151-0/+1
| | | | | | Part of C++20 Concepts implementation effort. Added Concept Specialization Expressions that are created when a concept is referenced with arguments, and tests thereof. llvm-svn: 374882
* [Format] Add machine-readable SPDX license ID to clang-format.elSam McCall2019-10-151-0/+1
| | | | llvm-svn: 374864
* [OPENMP50]Add support for 'parallel master taskloop' construct.Alexey Bataev2019-10-142-0/+12
| | | | | | | | | Added parsing/sema/codegen support for 'parallel master taskloop' constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final' and 'priority' are not supported in full, only constant expressions can be used currently in these clauses. llvm-svn: 374791
* [clang] [clang-offload-bundler] Fix finding installed llvm-objcopyMichal Gorny2019-10-141-0/+2
| | | | | | | | | | | | | | | | | Allow finding installed llvm-objcopy in PATH if it's not present in the directory containing clang-offload-bundler. This is the case if clang is being built stand-alone, and llvm-objcopy is already installed while the c-o-b tool is still present in build directory. This is consistent with how e.g. llvm-symbolizer is found in LLVM. However, most of similar searches in LLVM and Clang are performed without special-casing the program directory. Fixes r369955. Differential Revision: https://reviews.llvm.org/D68931 llvm-svn: 374754
* [clang-format] Proposal for clang-format to give compiler style warningsPaul Hoad2019-10-132-61/+180
| | | | | | relanding {D68554} with fixed lit tests, checked on Windows and MacOS llvm-svn: 374720
* Revert r374663 "[clang-format] Proposal for clang-format to give compiler ↵Nico Weber2019-10-122-180/+61
| | | | | | | | | | style warnings" The test fails on macOS and looks a bit wrong, see comments on the review. Also revert follow-up r374686. llvm-svn: 374688
* [clang-format] Proposal for clang-format to give compiler style warningsPaul Hoad2019-10-122-61/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Related somewhat to {D29039} On seeing a quote on twitter by @invalidop > If it's not formatted with clang-format it's a build error. This made me want to change the way I use clang-format into a tool that could optionally show me where my source code violates clang-format syle. When I'm making a change to clang-format itself, one thing I like to do to test the change is to ensure I didn't cause a huge wave of changes, what I want to do is simply run this on a known formatted directory and see if any new differences arrive in a manner I'm used to. This started me thinking that we should allow build systems to run clang-format on a whole tree and emit compiler style warnings about files that fail clang-format in a form that would make them as a warning in most build systems and because those build systems range in their construction I don't think its unreasonable to NOT expect them to have to do the directory searching or parsing the output replacements themselves, but simply transform that into an error code when there are changes required. I am starting this by suggesing adding a -n or -dry-run command line argument which would emit a warning/error of the form Support for various common compiler command line argumuments like '-Werror' and '-ferror-limit' could make this very flexible to be integrated into build systems and CI systems. ``` > $ /usr/bin/clang-format --dry-run ClangFormat.cpp -ferror-limit=3 -fcolor-diagnostics > ClangFormat.cpp:54:29: warning: code should be clang-formatted [-Wclang-format-violations] > static cl::list<std::string> > ^ > ClangFormat.cpp:55:20: warning: code should be clang-formatted [-Wclang-format-violations] > LineRanges("lines", cl::desc("<start line>:<end line> - format a range of\n" > ^ > ClangFormat.cpp:55:77: warning: code should be clang-formatted [-Wclang-format-violations] > LineRanges("lines", cl::desc("<start line>:<end line> - format a range of\n" > ^ ``` Reviewers: mitchell-stellar, klimek, owenpan Reviewed By: klimek Subscribers: mgorny, cfe-commits Tags: #clang-format, #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D68554 llvm-svn: 374663
* [OPENMP50]Support for 'master taskloop' directive.Alexey Bataev2019-10-102-0/+11
| | | | | | Added full support for master taskloop directive. llvm-svn: 374437
* Remove rest of time-trace message as it is inconsistent styleRussell Gallop2019-10-101-2/+0
| | | | | | | | | Other options which create output files don't produce output messages. Improve documentation to help find trace file. Differential Revision: https://reviews.llvm.org/D68710 llvm-svn: 374294
* [Clang][OpenMP Offload] Add new tool for wrapping offload device binariesSergey Dmitriev2019-10-093-0/+220
| | | | | | | | | | This patch removes the remaining part of the OpenMP offload linker scripts which was used for inserting device binaries into the output linked binary. Device binaries are now inserted into the host binary with a help of the wrapper bit-code file which contains device binaries as data. Wrapper bit-code file is dynamically created by the clang driver with a help of new tool clang-offload-wrapper which takes device binaries as input and produces bit-code file with required contents. Wrapper bit-code is then compiled to an object and resulting object is appended to the host linking by the clang driver. This is the second part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943). Differential Revision: https://reviews.llvm.org/D68166 llvm-svn: 374219
* [clang-offload-bundler] Support `.cui` and `.d`.Michael Liao2019-10-091-0/+8
| | | | | | | | | | | | Reviewers: tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68663 llvm-svn: 374167
* [clang-format] [NFC] Ensure clang-format is itself clang-formatted.Paul Hoad2019-10-071-34/+37
| | | | | | | | | | | | | | | | | | | Summary: Before making a proposed change, ensure ClangFormat.cpp is fully clang-formatted, no functional change just clang-formatting using the in tree .clang-format. Reviewers: mitchell-stellar Reviewed By: mitchell-stellar Subscribers: Eugene.Zelenko, cfe-commits Tags: #clang-format, #clang Differential Revision: https://reviews.llvm.org/D68551 llvm-svn: 373921
* [clang] [cmake] Use add_clang_tool() to install all toolsMichal Gorny2019-10-043-11/+3
| | | | | | | | | | Switch clang-check, clang-extdef-mapping and clang-offload-bundler to use add_clang_tool() rather than add_clang_executable() with a custom install rule. This makes them LLVM_DISTRIBUTION_COMPONENTS-friendly. Differential Revision: https://reviews.llvm.org/D68429 llvm-svn: 373785
* Add missing null pointer check in -ftime-trace codeReid Kleckner2019-10-041-13/+14
| | | | | | | | | | | | createOutputFile diagnoses the error for the caller already, so recover by not writing the output. Fixes PR43555 No test, since I couldn't think of a good, portable, simple way to make the regular -o output file writable, but outputfile.json not writable. llvm-svn: 373771
* [CMake] Clang: Don't use object libraries with XcodeJordan Rose2019-10-041-1/+7
| | | | | | | | | | | Undoes some of the effects of r360946 when using the Xcode CMake generator---it doesn't handle object libraries correctly at all. Attempts to still honor BUILD_SHARED_LIBS for Xcode, but I didn't actually test it. Should have no effect on non-Xcode generators. https://reviews.llvm.org/D68430 llvm-svn: 373769
* [clang] [cmake] Add distribution install targets for remaining componentsMichal Gorny2019-10-042-6/+30
| | | | | | | | | Add install targets as necessary to install bash-autocomplete, scan-build and scan-view via LLVM_DISTRIBUTION_TARGETS. Differential Revision: https://reviews.llvm.org/D68413 llvm-svn: 373695
* [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSourceRaphael Isemann2019-10-011-2/+2
| | | | | | NFC preparation work for upcoming ExternalASTMerger patches. llvm-svn: 373312
* Decrease the verbosity of the -ftime-trace optionSylvestre Ledru2019-10-011-3/+0
| | | | | | | | | | | | | | | | | | | | | And move the relevant information in the doc. Summary: Currently, building a large software like Firefox shows 'Use chrome://tracing or Speedscope App (https://www.speedscope.app) for flamegraph visualization' for each file. Reviewers: anton-afanasyev Reviewed By: anton-afanasyev Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68260 llvm-svn: 373308
* Correct function declarations; NFC.Aaron Ballman2019-09-301-2/+4
| | | | | | This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage. llvm-svn: 373213
* [clang-format] [PR36858] Add missing .hh and .cs extensions from python ↵Paul Hoad2019-09-242-3/+4
| | | | | | | | | | | | | | | | | | support utilities Summary: https://bugs.llvm.org/show_bug.cgi?id=36858 identifies .hh as a missing C++ header extension file while making this change I realized there was no support for .cs files which were added recently Reviewers: pseyfert, klimek, owenpan Reviewed By: klimek Subscribers: cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D67949 llvm-svn: 372760
* [clang-scan-deps] strip the --serialize-diagnostics argumentAlex Lorenz2019-09-211-0/+2
| | | | | | | This ensures that clang-scan-deps won't write out diagnostics when scanning dependencies. llvm-svn: 372444
* [Timers] Fix printing some `-ftime-report` sections twice. Fixes PR40328.Volodymyr Sapsai2019-09-183-0/+3
| | | | | | | | | | | | | | | | | | | | Starting from r324788 timer groups aren't cleared automatically when printed out. As a result some timer groups were printed one more time. For example, "Pass execution timing report" was printed again in `ManagedStatic<PassTimingInfo>` destructor, "DWARF Emission" in `ManagedStatic<Name2PairMap> NamedGroupedTimers` destructor. Fix by clearing timer groups manually. Reviewers: thegameg, george.karpenkov Reviewed By: thegameg Subscribers: aprantl, jkorous, dexonsmith, ributzka, aras-p, cfe-commits Differential Revision: https://reviews.llvm.org/D67683 llvm-svn: 372191
* [clang-scan-deps] Add verbose modeJan Korous2019-09-171-2/+9
| | | | | | | | When running in the default mode we don't print anything other than actual output to stdout to make automated processing easier. Differential Revision: https://reviews.llvm.org/D67522 llvm-svn: 372174
* [clang-scan-deps] Add -M to work around -MT issue after r371918Fangrui Song2019-09-141-0/+1
| | | | | | | | | | | gcc will complain if -MT is used but neither -M nor -MM is specified: > cc1: error: to generate dependencies you must specify either -M or -MM r371918 changed our behavior to match GCC, but apparently clang-scan-deps is not happy. llvm-svn: 371920
* Fix a perl warning: Scalar value @ArgParts[0] better written as $ArgParts[0] ↵Sylvestre Ledru2019-09-131-1/+1
| | | | | | at /usr/share/clang/scan-build-10/libexec/ccc-analyzer line 502. llvm-svn: 371832
* [libclang] Expose abort()-ing LLVM fatal error handlerJan Korous2019-09-124-9/+34
| | | | | | Differential Revision: https://reviews.llvm.org/D66775 llvm-svn: 371787
* NFC, add missing cl::cat option category to clang-scan-deps options to ↵Alex Lorenz2019-09-121-2/+3
| | | | | | ensure they show up in -help llvm-svn: 371759
* [clang-scan-deps] Add dependency targetsJan Korous2019-09-121-1/+43
| | | | | | Differential Revision: https://reviews.llvm.org/D67475 llvm-svn: 371697
OpenPOWER on IntegriCloud