summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Use -f instead of -d flag for testing existing of clang executable ↵Ted Kremenek2015-09-121-2/+2
| | | | | | (http://reviews.llvm.org/D12827). llvm-svn: 247510
* [tooling] In CompileCommand, Expose the 'file' that was associated with the ↵Argyrios Kyrtzidis2015-09-112-0/+11
| | | | | | command. llvm-svn: 247468
* [analyzer] Improve behavior if Clang not found.Anton Yartsev2015-09-111-31/+33
| | | | | | | - Eliminate 'No such file or directory at scan-build line ...' error if '$RealBin/bin/clang' or '$RealBin/clang' directory does not exist. - Eliminate 'Use of uninitialized value $Clang in concatenation (.) or string at scan-build line ...' error if help is displayed while $Clang was not found. llvm-svn: 247466
* [libclang] Add missing clang_CompileCommand_* functions in libclang.exports.Argyrios Kyrtzidis2015-09-091-0/+2
| | | | llvm-svn: 247176
* [analyzer] Apply whitespace cleanups by Honggyu Kim.Ted Kremenek2015-09-082-2/+2
| | | | llvm-svn: 246978
* Index: expose visibility attributeSaleem Abdulrasool2015-09-052-0/+16
| | | | | | | Expose the previously unexposed visibility attribute via the python and C bindings. llvm-svn: 246931
* [libclang] Return deduced type for auto type, not the one written in the source.Manuel Klimek2015-09-031-9/+3
| | | | | | | | | | | | It used to work, but was accidentally broken by r179769. The issue with decayed types was fixed by r190796. So this patch partially reverts r179769, and adds more tests. This also fixes PR 18669. Patch by Sergey Kalinichev. llvm-svn: 246778
* [analyzer] Refactoring: bring together scan-build options and environment ↵Anton Yartsev2015-09-021-269/+301
| | | | | | | | | | | variables. Full list of changes: - all scan-build command-line arguments are now kept in %Options hash. - most of environment variables scan-build operates with are stored in %EnvVars hash. - moved processing of command-line arguments to the ProcessArgs subroutine. llvm-svn: 246710
* Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1Adrian Prantl2015-08-271-1/+2
| | | | | | | | | | | | | to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
* [OPENMP 4.0] Initial support for array sections.Alexey Bataev2015-08-252-0/+6
| | | | | | | | Adds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0). Currently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions. Differential Revision: http://reviews.llvm.org/D10732 llvm-svn: 245937
* [libclang] For convenience to clients, make sure that nullability and ↵Argyrios Kyrtzidis2015-08-241-0/+5
| | | | | | | | | | __kindof annotations do not hide the underlying type. rdar://22063577 llvm-svn: 245867
* [OPENMP 4.1] Initial support for 'simdlen' clause.Alexey Bataev2015-08-211-0/+4
| | | | | | Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter. llvm-svn: 245692
* [analyzer] Fix for PR24112 (scan-build doesn't work with ↵Anton Yartsev2015-08-201-8/+14
| | | | | | | | --use-analyzer="path to clang++.exe"). Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is really the path_to_clang++. llvm-svn: 245621
* Update to reflect the library set in LLVM changing.Chandler Carruth2015-08-181-1/+0
| | | | llvm-svn: 245320
* [OPENMP 4.1] Allow variables with reference types in private clauses.Alexey Bataev2015-08-181-0/+3
| | | | | | OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types. llvm-svn: 245268
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-131-2/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Update for llvm api change.Rafael Espindola2015-08-131-1/+1
| | | | llvm-svn: 244855
* [analyzer] Incorrect env variable replaced.Anton Yartsev2015-08-111-1/+1
| | | | llvm-svn: 244673
* [clang-cl] Add support for CL and _CL_ environment variablesDavid Majnemer2015-08-101-0/+32
| | | | | | | | | | cl uses 'CL' and '_CL_' to prepend and append command line options to the given argument vector. There is an additional quirk whereby '#' is transformed into '='. Differential Revision: http://reviews.llvm.org/D11896 llvm-svn: 244473
* [Static Analyzer] Add --analyzer-target option to scan-build.Ted Kremenek2015-08-082-1/+37
| | | | | | | | | | | | | | When interposing on a compiler doing cross-compilation, scan-build does not infer the target triple needed to pass to clang for doing static analysis. The --analyzer-target option allows one to manually specify the target triple used during static analysis (and only static analysis) for such cases. Patch by Honggyu Kim! Reviewed in http://reviews.llvm.org/D10356. llvm-svn: 244400
* This patch commits OpenMP 4 target device clausesMichael Wong2015-08-071-0/+4
| | | | | | | This is committed on behalf of Kelvin Li http://reviews.llvm.org/D11469?id=31227 llvm-svn: 244325
* Rename DescriptionString -> DataLayoutString as it matches the actualEric Christopher2015-08-051-1/+1
| | | | | | use of the string. llvm-svn: 244178
* Fix a tiny bug in -no-canonical-prefixes that somehow we have neverChandler Carruth2015-08-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | noticed until now. The code for setting up the driver's InstalledDir didn't respect -no-canonical-prefixes. Because of this, there are a few places in the driver where we would unexpectedly form absolute paths, notably when searching for and finding GCC installations to use, etc. The fix is straightforward, and I've added this path to '-v' both so we can test it sanely and so that it will be substantially more obvious the next time someone has to debug something here. Note that there is another bug that we don't actually *canonicalize* the installed directory! I don't really want to fix that because I don't have a realistic way to test the usage of this mode. I suspect that folks using the shared module cache would care about getting this right though, and so they might want to address it. I've left the appropriate FIXMEs so that it is clear what to change, and I've updated the test code to make it clear what is happening here. llvm-svn: 244065
* [UB] Avoid a really broken call to realloc that would later result inChandler Carruth2015-08-041-0/+11
| | | | | | | | | | | | a bad call to memcpy. When we only have a buffer from one of the two reparse calls, we can just return that buffer rather than going through the realloc/memcpy dance. Found with UBsan. llvm-svn: 243950
* Remove unused header include.Argyrios Kyrtzidis2015-08-041-1/+0
| | | | llvm-svn: 243938
* Use llvm::reverse to make a bunch of loops use foreach. NFC.Pete Cooper2015-07-301-4/+2
| | | | | | | | | | | | | | | | In llvm commit r243581, a reverse range adapter was added which allows us to change code such as for (auto I = Fields.rbegin(), E = Fields.rend(); I != E; ++I) { in to for (const FieldDecl *I : llvm::reverse(Fields)) This commit changes a few of the places in clang which are eligible to use this new adapter. llvm-svn: 243663
* [OPENMP 4.1] Initial support for extended 'ordered' clause.Alexey Bataev2015-07-301-1/+3
| | | | | | | | OpenMP 4.1 introduces optional argument '(n)' for 'ordered' clause, where 'n' is a number of loops that immediately follow the directive. 'n' must be constant positive integer expressions and it must be less or equal than the number of the loops in the resulting loop nest. Patch adds parsing and semantic analysis for this optional argument. llvm-svn: 243635
* [libclang] Use lambdas instead of explicit structs when storing arguments.Benjamin Kramer2015-07-254-251/+134
| | | | | | | This boilerplate code was necessary to move arguments between threads in C++98, lambdas make this much easier. No functionality change intended. llvm-svn: 243227
* Fix the cc1as crash when it outputs assemblySteven Wu2015-07-241-0/+3
| | | | | | | | In clang cc1as_main, when the output file type is “asm”, AsmStreamer owns a formatted_raw_ostream which has a reference to FDOS (raw_ostream), so AsmStreamer must be closed before FDOS is closed. llvm-svn: 243085
* Commit for http://reviews.llvm.org/D10765Michael Wong2015-07-212-0/+11
| | | | | | | for OpenMP 4 target data directive parsing and sema. This commit is on behalf of Kelvin Li. llvm-svn: 242785
* Fix clang-fuzzer build after r242499.Adrian Prantl2015-07-171-1/+1
| | | | llvm-svn: 242505
* Make the clang module container format selectable from the command line.Adrian Prantl2015-07-177-14/+15
| | | | | | | | | | | | | - introduces a new cc1 option -fmodule-format=[raw,obj] with 'raw' being the default - supports arbitrary module container formats that libclang is agnostic to - adds the format to the module hash to avoid collisions - splits the old PCHContainerOperations into PCHContainerWriter and a PCHContainerReader. Thanks to Richard Smith for reviewing this patch! llvm-svn: 242499
* [clang-cl] Use the Windows response file tokenizerReid Kleckner2015-07-151-41/+67
| | | | | | | | | | | | | | | | | | | | We were still using the Unix response file tokenizer for all driver modes. This was difficult to get right in the beginning because there is a circular dependency. The Driver class also can't officially determine its mode until it can see all possible --driver-mode= flags, and those flags could come from the response file. Now we use the Windows parsing algorithm if the program name looks like clang-cl, or if the --driver-mode=cl flag is present on the main command line. Fixes PR23709. Reviewers: hans Differential Revision: http://reviews.llvm.org/D11229 llvm-svn: 242346
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | CUDA code. NOTE: reverts r242077 to reinstate r242058, r242065, 242067 and includes fix for OS X test failures. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242085
* This reverts commit r242058, r242065, r242067.Rafael Espindola2015-07-131-6/+0
| | | | | | | | | | The tests were failing on OS X. Revert "[cuda] Driver changes to compile and stitch together host and device-side CUDA code." Revert "Fixed regex to properly match '64' in the test case." Revert "clang/test/Driver/cuda-options.cu REQUIRES clang-driver, at least." llvm-svn: 242077
* [cuda] Driver changes to compile and stitch together host and device-side ↵Artem Belevich2015-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | CUDA code. - Changed driver pipeline to compile host and device side of CUDA files and incorporate results of device-side compilation into host object file. - Added a test for cuda pipeline creation in clang driver. New clang options: --cuda-host-only - Do host-side compilation only. --cuda-device-only - Do device-side compilation only. --cuda-gpu-arch=<ARCH> - specify GPU architecture for device-side compilation. E.g. sm_35, sm_30. Default is sm_20. May be used more than once in which case one device-compilation will be done per unique specified GPU architecture. Differential Revision: http://reviews.llvm.org/D9509 llvm-svn: 242058
* Tweak libclang's users, c-arcmt-test, c-index-test and libclangTests to ↵NAKAMURA Takumi2015-07-122-0/+8
| | | | | | satisfy LDFLAGS=-static. llvm-svn: 241992
* Reformat Makefile.NAKAMURA Takumi2015-07-122-2/+12
| | | | llvm-svn: 241991
* clang-format: Extend vim integration so that a line range can be passed in.Daniel Jasper2015-07-111-2/+16
| | | | llvm-svn: 241976
* Add clang_free to libclang to free memory allocated in libclang.Yaron Keren2015-07-092-0/+5
| | | | | | | | | | | | | | One of the problems libclang tests has running under Windows is memory allocated in libclang.dll but being freed in the test executable, possibly by a different memory manager. This patch exposes a new export function, clang_free(), used to free any allocated memory with the same libclang.dll memory manager that allocated the memory. http://reviews.llvm.org/D10949 Reviewed by Reid Kleckner, Douglas Gregor. llvm-svn: 241789
* Revert r241770 and add Basic to the dependencies of clang-check instead.Adrian Prantl2015-07-091-0/+1
| | | | | | PR24067. llvm-svn: 241782
* Revert "Fix a linker issue with clang-check on Linux."Adrian Prantl2015-07-081-2/+0
| | | | | | This reverts commit r241636 as it turned out to be unnecessary. llvm-svn: 241684
* [CMake] clang-check: Prune redundant libdeps introduced in r241653.NAKAMURA Takumi2015-07-081-14/+0
| | | | llvm-svn: 241680
* [CMake] Reorder libdeps. NFC.NAKAMURA Takumi2015-07-082-5/+2
| | | | llvm-svn: 241661
* [CMake] Fill up required libs, corresponding to r241653.NAKAMURA Takumi2015-07-081-0/+1
| | | | llvm-svn: 241660
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-087-12/+58
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-077-43/+12
| | | | | | failures. llvm-svn: 241642
* Fix a linker issue with clang-check on Linux.Adrian Prantl2015-07-071-0/+2
| | | | | | There must be a better way to fix this — I'll keep investigating. llvm-svn: 241636
* Add LLVM backend dependencies to clang-check also in cmake.Adrian Prantl2015-07-071-1/+14
| | | | llvm-svn: 241627
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-077-11/+27
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
OpenPOWER on IntegriCloud