summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
* [clang] Fix D26214: Move error handling out of MC and to the callers.Mandeep Singh Grang2016-12-061-4/+7
| | | | | | | | | | | | | | Summary: Related llvm patch: https://reviews.llvm.org/D27359 Reviewers: echristo, t.p.northover, rengolin, grosbach, compnerd Subscribers: mehdi_amini, cfe-commits, llvm-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D27360 llvm-svn: 288762
* Add the --no-color option to the git call in the doc when using ↵Sylvestre Ledru2016-12-031-1/+1
| | | | | | clang-format-diff llvm-svn: 288605
* [libclang] Add APIs to check the result of an integer expression in ↵Argyrios Kyrtzidis2016-12-013-5/+47
| | | | | | | | | CXEvalResult without overflow Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26788 llvm-svn: 288438
* [clang] Implement support for -defsym assembler optionMandeep Singh Grang2016-12-011-0/+12
| | | | | | | | | | | | | | | | | Summary: Adds support for -Wa,-defsym,abc=1 option. Related llvm patch: https://reviews.llvm.org/D26214 Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin Subscribers: mehdi_amini Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26213 llvm-svn: 288397
* Fix VS2015 build of clang-format-vsix by using NuGet to pull in required ↵Hans Wennborg2016-12-015-24/+138
| | | | | | | | | | assemblies Also added a gitignore to help track the right items to commit. Patch by Antonio Maiorano <amaiorano@gmail.com>! llvm-svn: 288393
* [OpenMP] Sema and parsing for 'teams distribute parallel for simd' pragmaKelvin Li2016-11-302-0/+12
| | | | | | | | This patch is to implement sema and parsing for 'teams distribute parallel for simd' pragma. Differential Revision: https://reviews.llvm.org/D27084 llvm-svn: 288294
* getObjCEncodingForMethodDecl cannot fail. Simplify. NFC.John McCall2016-11-291-4/+3
| | | | llvm-svn: 288203
* [CMake] Fixing clang standalone buildChris Bieneman2016-11-192-2/+10
| | | | | | I broke this in r287406 and r287407. llvm-svn: 287463
* [CMake] clang depends on intrinsics_genChris Bieneman2016-11-181-0/+3
| | | | | | | | | | | | | | | cc1_main.cpp has the following include chain: llvm/LinkAllPasses.h llvm/Analysis/AliasSetTracker.h llvm/Analysis/AliasAnalysis.h llvm/IR/CallSite.h llvm/IR/Attributes.h llvm/IR/Attributes.gen This means clang needs to depend on intrinsics_gen. llvm-svn: 287407
* [CMake] clang-offload-bundler depends on intrinsics_genChris Bieneman2016-11-181-0/+3
| | | | | | | | | | | | | | | | ClangOffloadBundler.cpp has the following include chain: llvm/Bitcode/BitcodeWriter.h llvm/IR/ModuleSummaryIndex.h llvm/IR/Module.h llvm/IR/Function.h llvm/IR/Argument.h llvm/IR/Attributes.h llvm/IR/Attributes.gen This means clang-offload-bundler needs to depend on intrinsics_gen. llvm-svn: 287406
* [CMake] Fixing variable names that were mistypedChris Bieneman2016-11-181-1/+1
| | | | | | This is a silly bug that I'm sure I caused... llvm-svn: 287366
* Link include-fixer into libclang if clang-tools-extra is checked out.Benjamin Kramer2016-11-172-0/+7
| | | | | | | | | | | | include-fixer only slightly bloats the size of libclang, but since libclang has no explicit plugin mechanism it's the only way of getting this to work. Clang-tidy is already there and so far there weren't many complaints ;) This is designed to be easy to remove again if libclang ever grows proper plugin support. llvm-svn: 287229
* [libclang] Generalize clang_getNumTemplateArguments and ↵Argyrios Kyrtzidis2016-11-151-15/+10
| | | | | | | | | clang_getTemplateArgumentAsType to other kind of specializations. Patch by Emilio Cobos Álvarez! https://reviews.llvm.org/D26663 llvm-svn: 287024
* Add explicit (void) cast to result of unique_ptr::release()Eric Fiselier2016-11-141-1/+1
| | | | llvm-svn: 286796
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-112-8/+8
| | | | | | This better reflects what it represents. llvm-svn: 286680
* Mirror the llvm changes that split Bitcode/ReaderWriter.hTeresa Johnson2016-11-111-1/+1
| | | | | | | | | | The change in D26502 splits ReaderWriter.h, which contains the APIs into both the BitReader and BitWriter libraries, into BitcodeReader.h and BitcodeWriter.h. Change clang uses to the appropriate split header(s). llvm-svn: 286567
* [libclang] Fix issue with clang_tokenize and make sure it interprets ↵Argyrios Kyrtzidis2016-11-091-1/+1
| | | | | | | | CXSourceRange as half-open character range. Patch provided by Emilio Cobos Álvarez! (https://reviews.llvm.org/D26446) llvm-svn: 286421
* Replace TimeValue with TimePoint in BuildSystem.cpp. NFC.Pavel Labath2016-11-091-2/+2
| | | | llvm-svn: 286357
* clang-format: Use git-ls-tree to get file mode in diff modeStephen Hines2016-11-081-1/+10
| | | | | | | | | | | | | | | | | | Summary: If a file has been renamed/deleted from the filesystem and --diff mode with two commits is active, attempting to get the file's mode will fail. This change uses git-ls-tree instead to get the correct permissions for the given revision. Patch by Luis Hector Chavez! Reviewers: djasper, lodato Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D26287 llvm-svn: 286212
* [index] Expose FriendDeclOlivier Goffart2016-11-042-1/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D26285 llvm-svn: 285984
* Remove the unused POLLY_LINK_LIBS for linking polly into clangHongbin Zheng2016-11-031-5/+0
| | | | llvm-svn: 285971
* regcall: Implement regcall Calling Conv in clangErich Keane2016-11-021-0/+1
| | | | | | | | | | This patch implements the register call calling convention, which ensures as many values as possible are passed in registers. CodeGen changes were committed in https://reviews.llvm.org/rL284108. Differential Revision: https://reviews.llvm.org/D25204 llvm-svn: 285849
* Attempt to make clang-format.py python 3 - compatible.Alexander Kornienko2016-10-271-1/+1
| | | | llvm-svn: 285301
* Fix warnings from python difflib.Alexander Kornienko2016-10-271-3/+3
| | | | llvm-svn: 285291
* Re-apply patch r279045.Kelvin Li2016-10-252-0/+12
| | | | llvm-svn: 285066
* Fix clang-format vim integration issue with non-ascii charactersAlexander Kornienko2016-10-241-1/+1
| | | | | | | | | | | | | | | | clang-format.py currently seems to treat vim.current.buf as ascii-encoded data, which leads to an UnicodeDecodeError when trying to format any text containing non-ascii characters: Traceback (most recent call last): File "<string>", line 1, in <module> File ".../tools/clang/tools/clang-format/clang-format.py", line 110, in <module> main() File ".../tools/clang/tools/clang-format/clang-format.py", line 87, in main stdout, stderr = p.communicate(input=text.encode(encoding)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 3996: ordinal not in range(128) llvm-svn: 284988
* Replace uses of LLVM_FUNCTION_NAME with __func__, this was macro was removed ↵Erik Pilkington2016-10-203-4/+4
| | | | | | from llvm/Support in r284681 llvm-svn: 284690
* Disable a silly GCC diagnostic for combining a scanf length specifier with theRichard Smith2016-10-151-0/+10
| | | | | | | '*' specifier. Apparently the GNU folks want to discourage self-documenting code. llvm-svn: 284300
* [linux] When pre-reserving stack pages to work around broken address spaceRichard Smith2016-10-141-7/+35
| | | | | | | | layout for PIE binaries, ask the OS how much stack space is already in use to avoid stack overflow if we are run with more than 512K of combined command line arguments + environment variables. llvm-svn: 284271
* Store FileEntry::Filename as a StringRef instead of raw pointer (NFC)Mehdi Amini2016-10-101-3/+4
| | | | llvm-svn: 283815
* Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini2016-10-081-2/+1
| | | | | | | | | | | | | | | template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
* Minor cleanups in clang-format.el.Manuel Klimek2016-10-041-41/+48
| | | | | | | | | | | | | | | | | | - Enable lexical binding - Formatting - Enable file name completion for the clang-format-executable variable - Add a missing docstring - When available, use bufferpos-to-filepos and filepos-to-bufferpos. These functions given more precise mapping than byte-to-position and position-bytes. - Rename arguments of clang-format-region to match the docstring - Instead of binding local variables to nil and then assigning them, bind them directly to their values - Make use of the fact that insert-file-contents returns the number of characters it inserted - Use cl-destructuring-bind to make the code a bit shorter - Use standard iteration (dolist) instead of mapc with a lambda, which is more common and shorter - Remove a message that was most likely only present for debugging purposes Patch by Philipp Stephani. llvm-svn: 283206
* [cmake] Install 'clang-cpp' symlinkMichal Gorny2016-10-021-1/+1
| | | | | | | | | | | | | | | Install the 'clang-cpp' symlink used to spawn the preprocessor. The code handling this suffix is already included in Driver. FreeBSD is already creating such a symlink in ports, and a similar one was requested by Gentoo/FreeBSD team. The goal is to handle software that takes a C preprocessor via a variable but does not handle passing options correctly (i.e. 'clang -E' does not work). Bug: https://bugs.gentoo.org/478810 Differential Revision: https://reviews.llvm.org/D25161 llvm-svn: 283075
* [analyzer][scan-build-py] subprocess output handling reviewed in clang moduleLaszlo Nagy2016-09-243-100/+156
| | | | llvm-svn: 282317
* clang-format: Add an option to git-clang-format to diff between to commitsStephen Hines2016-09-221-50/+97
| | | | | | | | | | | | | | | | | | | | | Summary: When building pre-upload hooks using git-clang-format, it is useful to limit the scope to a diff of two commits (instead of from a commit against the working tree) to allow for less false positives in dependent commits. This change adds the option of specifying two git commits to git-clang-format when using the `--diff` flag, which uses a different strategy to diff (using `git-diff-tree` instead of `git-diff-index`), and runs clang-format against the second commit instead of the working directory. There is a slight backwards-incompatibility introduced with this change: if a filename matches a branch name or other commit-ish, then `git clang-format <commit> <file>` will no longer work as expected; use `git clang-format <commit> -- <file>` instead. Patch by Luis Hector Chavez! Reviewers: djasper, lodato Subscribers: lodato, cfe-commits, srhines Projects: #clang-c Differential Revision: https://reviews.llvm.org/D24319 llvm-svn: 282136
* clang-format VS plugin: upgrade the project files to VS2015Hans Wennborg2016-09-153-4/+6
| | | | | | | The plugin itself runs on previous VS versions, but this enables it to be built with VS2015. llvm-svn: 281648
* [analyzer] scan-build-py: Remove relative path hack for SATestsBuild.pyDevin Coughlin2016-09-142-26/+1
| | | | | | | | | | | | | | | | | Remove the relative path hack in scan-build-py that converts a fully qualified directory name and a fully qualified file path to a relative path before running the analyzer on a file. This hack is not needed: the bad interaction with SATestsBuild.py it was intended to address is actually the same underlying problem that r280768 fixed. Further, because the hack would always relativize paths, it caused SATestBuild.py to be unable to properly line up issues when the build system changed directory and then built a source file in a child directory but used a fully-qualified path for the source file. Differential Revision: https://reviews.llvm.org/D24470 llvm-svn: 281516
* ObjectiveC generics: Add ObjCTypeParamType in the type system.Manman Ren2016-09-131-0/+12
| | | | | | | | | | | | | | | | | We also need to add ObjCTypeParamTypeLoc. ObjCTypeParamType supports the representation of "T <protocol>" where T is a type parameter. Before this, we use TypedefType to represent the type parameter for ObjC. ObjCTypeParamType has "ObjCTypeParamDecl *OTPDecl" and it extends from ObjCProtocolQualifiers. It is a non-canonical type and is canonicalized to the underlying type with the protocol qualifiers. rdar://24619481 rdar://25060179 Differential Revision: http://reviews.llvm.org/D23079 llvm-svn: 281355
* clang-format: Add Java detection to git-clang-format.Stephen Hines2016-09-131-0/+1
| | | | | | | | | | | | | | Summary: This change adds "java" to the list of known extensions that clang-format supports. Patch by Luis Hector Chavez Reviewers: djasper Subscribers: srhines, cfe-commits Differential Revision: https://reviews.llvm.org/D24401 llvm-svn: 281294
* Handle empty message in static_asserts.Richard Trieu2016-09-131-2/+3
| | | | llvm-svn: 281287
* clang-format: Make emacs integration work with narrowed buffers.Daniel Jasper2016-09-121-1/+1
| | | | | | | | | Use (call-process region nil ...) instead of (point-min) so that the call works in narrowed buffers. Patch by Philipp Stephani, thank you! llvm-svn: 281203
* C++ Modules TS: Add parsing and some semantic analysis support forRichard Smith2016-09-081-0/+1
| | | | | | | export-declarations. These don't yet have an effect on name visibility; we still export everything by default. llvm-svn: 280999
* [clang-offload-bundler] Fix some Clang-tidy modernize-use-override and ↵Eugene Zelenko2016-09-071-80/+120
| | | | | | | | Include What You Use warnings; other minor fixes. Differential revision: https://reviews.llvm.org/D24165 llvm-svn: 280828
* [scan-build-py] Increase precision of timestamp in report directory nameDevin Coughlin2016-09-062-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit improves compatibility with the perl version of scan-build. The perl version of scan-build produces output report directories with increasing lexicographic ordering. This ordering is relied on by the CmpRuns.py tool in utils/analyzer when comparing results for build commands with multiple steps. That tool tries to line up the output directory for each step between different runs of the analyzer based on the increasing directory name. The python version of scan-build uses file.mkdtemp() with a time stamp prefix to create report directories. The timestamp has a 1-second precision. This means that when analysis of a single build step takes less than a second the ordering property that CmpRuns.py expects will sometimes not hold, depending on the timing and the random suffix generated by mkdtemp(). Ultimately this causes CmpRuns to incorrectly correlate results from build steps and report spurious differences between runs. This commit increases the precision of the timestamp used in scan-build-py to the microsecond level. This approach still has the same underlying issue -- but in practice analysis of any build step is unlikely to take less than a millisecond. Differential Revision: https://reviews.llvm.org/D24163 llvm-svn: 280768
* [clang-cl] Check that we are in clang cl mode before enabling support for ↵Pierre Gousseau2016-09-061-1/+1
| | | | | | | | | | the CL environment variable. Checking for the type of the command line tokenizer should not be the criteria to enable support for the CL environment variable, this change checks that we are in clang-cl mode instead. Differential Revision: https://reviews.llvm.org/D23503 llvm-svn: 280702
* When we reach the end of a #include of a header of a local submodule that weRichard Smith2016-09-011-0/+8
| | | | | | | | | | textually included, create an ImportDecl just as we would if we reached a #include of any other modular header. This is necessary in order to correctly determine the set of variables to initialize for an imported module. This should hopefully make the modules selfhost buildbot green again. llvm-svn: 280409
* [clang-format-vim] Support vim linked against py3Luke Drummond2016-08-311-7/+11
| | | | | | | | | | | | clang-format.py previously only worked in vim compiled against python2. This patch adds the necessary syntax changes to make this work with vim linked against python3, which is now shipped by default for at least Ubuntu16 and Arch. Differential Revision: https://reviews.llvm.org/D23319 Subscribers: cfe-commits llvm-svn: 280240
* Fix memory leaks in clang-offload-bundlerVitaly Buka2016-08-251-9/+11
| | | | | | | | | | | | | | Summary: 1. Pair removed from StringMap was not destroyed 2. ObjectFile had no owner Reviewers: sfantao Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23865 llvm-svn: 279722
* clang-offload-bundler: Update libdeps.NAKAMURA Takumi2016-08-241-3/+1
| | | | llvm-svn: 279641
* [Driver][OpenMP][CUDA] Add capability to bundle object files in sections of ↵Samuel Antao2016-08-241-7/+296
| | | | | | | | | | | | | | | | | | | the host binary format. Summary: This patch adds the capability to bundle object files in sections of the host binary using a designated naming convention for these sections. This patch uses the functionality of the object reader already in the LLVM library to read bundled files, and invokes clang with the incremental linking options to create bundle files. Bundling files involves creating an IR file with the contents of the bundle assigned as initializers of globals binded to the designated sections. This way the bundling implementation is agnostic of the host object format. The features added by this patch were requested in the RFC discussion in http://lists.llvm.org/pipermail/cfe-dev/2016-February/047547.html. Reviewers: echristo, tra, jlebar, hfinkel, ABataev, Hahnfeld Subscribers: mkuron, whchung, cfe-commits, andreybokhanko, Hahnfeld, arpith-jacob, carlo.bertolli, mehdi_amini, caomhin Differential Revision: https://reviews.llvm.org/D21851 llvm-svn: 279634
OpenPOWER on IntegriCloud