summaryrefslogtreecommitdiffstats
path: root/clang/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix typos throughout the license files that somehow I and my reviewersChandler Carruth2019-01-211-1/+1
| | | | | | | | | | | all missed! Thanks to Alex Bradbury for pointing this out, and the fact that I never added the intended `legacy` anchor to the developer policy. Add that anchor too. With hope, this will cause the links to all resolve successfully. llvm-svn: 351731
* Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>Serge Guelton2019-01-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for isPodLike<std::pair<...>> did not match the expectation of std::is_trivially_copyable which makes the memcpy optimization invalid. This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable. Unfortunately std::is_trivially_copyable is not portable across compiler / STL versions. So a portable version is provided too. Note that the following specialization were invalid: std::pair<T0, T1> llvm::Optional<T> Tests have been added to assert that former specialization are respected by the standard usage of llvm::is_trivially_copyable, and that when a decent version of std::is_trivially_copyable is available, llvm::is_trivially_copyable is compared to std::is_trivially_copyable. As of this patch, llvm::Optional is no longer considered trivially copyable, even if T is. This is to be fixed in a later patch, as it has impact on a long-running bug (see r347004) Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296. Differential Revision: https://reviews.llvm.org/D54472 llvm-svn: 351701
* Update the license mentioned in this documentation.Chandler Carruth2019-01-191-1/+1
| | | | llvm-svn: 351651
* Update the license header in this man-page file.Chandler Carruth2019-01-191-2/+3
| | | | | | | | | It contains an `$Id$` expansion and so can only be updated from a true Subversion client. See the details of this update in r351636. llvm-svn: 351640
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-19122-486/+370
| | | | | | | | | | | | | | | | | 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
* Update some code used in our visual studio plugins to use linux fileChandler Carruth2019-01-193-458/+458
| | | | | | | | endings. We already used them in some cases, and this makes things consistent. This will also simplify updating the licenses in these files. llvm-svn: 351632
* Install new LLVM license structure and new developer policy.Chandler Carruth2019-01-191-16/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This installs the new developer policy and moves all of the license files across all LLVM projects in the monorepo to the new license structure. The remaining projects will be moved independently. Note that I've left odd formatting and other idiosyncracies of the legacy license structure text alone to make the diff easier to read. Critically, note that we do not in any case *remove* the old license notice or terms, as that remains necessary until we finish the relicensing process. I've updated a few license files that refer to the LLVM license to instead simply refer generically to whatever license the LLVM project is under, basically trying to minimize confusion. This is really the culmination of so many people. Chris led the community discussions, drafted the policy update and organized the multi-year string of meeting between lawyers across the community to figure out the strategy. Numerous lawyers at companies in the community spent their time figuring out initial answers, and then the Foundation's lawyer Heather Meeker has done *so* much to help refine and get us ready here. I could keep going on, but I just want to make sure everyone realizes what a huge community effort this has been from the begining. Differential Revision: https://reviews.llvm.org/D56897 llvm-svn: 351631
* [analyzer][CrossTU][NFC] Generalize to external definitions instead of ↵Rafael Stahl2019-01-1010-102/+104
| | | | | | | | | | | | | | | | external functions Summary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421 Reviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille Reviewed By: xazax.hun, martong Subscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56441 llvm-svn: 350852
* [libclang] Fix clang_Cursor_isAnonymousIvan Donchevskii2019-01-102-10/+15
| | | | | | | | Use the same logic as in TypePrinter::printTag to determine that the tag is anonymous and the separate check for namespaces. Differential Revision: https://reviews.llvm.org/D54996 llvm-svn: 350805
* Remove dependency-related arguments in clang-check.Alexander Kornienko2019-01-091-0/+1
| | | | | | | This is the default behavior of clang tools, but clang-check overrides default argument adjusters for some reason. llvm-svn: 350727
* [libclang] Fix the mismatched delete operator for ExprEvalResultAlex Lorenz2019-01-081-1/+1
| | | | | | | | The '.stringVal' field in ExprEvalResult is allocated using new[], but was freed using a regular delete. That caused memory leaks in the test from r350666. llvm-svn: 350680
* [libclang] Recommit r336590 with a fix for the memory leak in the testAlex Lorenz2019-01-081-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | The original commit had a memory leak in the test has a leak as it doesn't dispose of the evaluated cursor result. This also contains the follow-up NFC refactoring commit r336591. rdar://45893054 Original commit message: [libclang] evalute compound statement cursors before trying to evaluate the cursor like a declaration This change fixes a bug in libclang in which it tries to evaluate a statement cursor as a declaration cursor, because that statement still has a pointer to the declaration parent. rdar://38888477 Differential Revision: https://reviews.llvm.org/D49051 llvm-svn: 350666
* Portable Python script across Python versionSerge Guelton2019-01-032-9/+16
| | | | | | | | StringIO is obsoleted in Python3, replaced by io.BytesIO or io.StringIO depending on the use. Differential Revision: https://reviews.llvm.org/D55196 llvm-svn: 350318
* [libclang] CoroutineBody/Coreturn statements are UnexposedStmts and not ExprsAlex Lorenz2019-01-031-3/+6
| | | | | | | | | | | | | This change ensures that the libclang CXCursor represents the CoroutineBody and the Coreturn statement using the appropriate CXCursor_UnexposedStmt kind instead of CXCursor_UnexposedExpr. The problem with CXCursor_UnexposedExpr is that the consumer functions assumed that CoroutineBody/Coreturn statements were valid expressions and performed an invalid downcast to Expr causing assertion failures or other crashes. rdar://40204290 llvm-svn: 350282
* PR40096: Forwards-compatible with C++20 rule regarding aggregates not having ↵David Blaikie2018-12-191-3/+0
| | | | | | | | | | user-declared ctors Looks like these were in place to make these types move-only. That's generally not a feature that the type should prescribe (unless it's an inherent limitation) - instead leaving it up to the users of a type. llvm-svn: 349669
* Portable Python script across Python versionSerge Guelton2018-12-192-8/+15
| | | | | | | | | urllib2 as been renamed into urllib and the library layout has changed. Workaround that in a consistent manner. Differential Revision: https://reviews.llvm.org/D55199 llvm-svn: 349627
* Portable Python script across Python versionSerge Guelton2018-12-186-6/+6
| | | | | | | | Make scripts more future-proof by importing most __future__ stuff. Differential Revision: https://reviews.llvm.org/D55208 llvm-svn: 349504
* Portable Python script across Python versionSerge Guelton2018-12-181-3/+6
| | | | | | | | commands.getoutput has been move to subprocess module in Python3 Differential Revision: https://reviews.llvm.org/D55205 llvm-svn: 349503
* Portable Python script across Python versionSerge Guelton2018-12-182-4/+4
| | | | | | | | | | | In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create generator instead. The portability patch consists in forcing an extra `list` call if the result is actually used as a list. `map` are replaced by list comprehension and `filter` by filtered list comprehension. Differential Revision: https://reviews.llvm.org/D55197 llvm-svn: 349501
* [AST] Unify the code paths of traversing lambda expressions.Haojian Wu2018-12-181-17/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: This supposes to be a non-functional change. We have two code paths when traversing lambda expressions: 1) traverse the function proto typeloc when parameters and return type are explicit; 2) otherwise fallback to traverse parameter decls and return type loc individually; This patch unifies the code path to always traverse parameters and return type, rather than relying on traversing the full type-loc. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55820 llvm-svn: 349494
* Portable Python script across Python versionSerge Guelton2018-12-184-20/+25
| | | | | | | | Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across Python version. Differential Revision: https://reviews.llvm.org/D55213 llvm-svn: 349454
* Portable Python script across Python versionSerge Guelton2018-12-181-2/+5
| | | | | | | | ConfigParser module has been renamed as configparser in Python3 Differential Revision: https://reviews.llvm.org/D55200 llvm-svn: 349449
* Portable Python script across Python versionSerge Guelton2018-12-181-1/+1
| | | | | | | dict no longer have the `has_key` method in Python3. Instead, one can use the `in` keyword which already works in Python2. llvm-svn: 349447
* [libclang] Add dependency on clangSerialization to unbreak ↵Fangrui Song2018-12-151-0/+1
| | | | | | | | -DBUILD_SHARED_LIBS=1 build after rC349237 Frontend headers have undefined reference on the symbol `clang::PCHContainerOperations::PCHContainerOperations()` through some shared_ptr usage. Any dependents will get the undefined reference which can only be resolved by explicit dependency on clangSerialization (due to -z defs). llvm-svn: 349259
* Fix includes and dependencies for libclangRichard Trieu2018-12-155-6/+1
| | | | | | | | Remove unneeded includes Add needed include Remove dependency on Serialization llvm-svn: 349237
* Update the scan-build to generate SARIF.Aaron Ballman2018-12-132-4/+19
| | | | | | This updates the scan-build perl script to allow outputting to sarif in a more natural fashion by specifying -sarif as a command line argument, similar to how -plist is already supported. llvm-svn: 349082
* [OpenCL] Add generic AS to 'this' pointerMikael Nilsson2018-12-131-1/+1
| | | | | | | | | | | | | Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in FunctionProtoType. Note: This recommits the previously reverted patch, but now it is commited together with a fix for lldb. Differential Revision: https://reviews.llvm.org/D54862 llvm-svn: 349019
* Portable Python script across Python versionSerge Guelton2018-12-131-2/+5
| | | | | | | | SocketServer has been renamed socketserver in Python3. Differential Revision: https://reviews.llvm.org/D55258 llvm-svn: 349010
* Portable Python script across Python versionSerge Guelton2018-12-131-2/+2
| | | | | | | | Use higher-level and more compatible threading module to start a new thread. Differential Revision: https://reviews.llvm.org/D55259 llvm-svn: 349008
* [Driver] Add support for -fembed-bitcode for assembly fileSteven Wu2018-12-121-0/+23
| | | | | | | | | | | | | | | | | | Summary: Handle -fembed-bitcode for assembly inputs. When the input file is assembly, write a marker as "__LLVM,__asm" section. Fix llvm.org/pr39659 Reviewers: compnerd, dexonsmith Reviewed By: compnerd Subscribers: rjmccall, dblaikie, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D55525 llvm-svn: 348943
* Revert "[OpenCL] Add generic AS to 'this' pointer"Mikael Nilsson2018-12-121-1/+1
| | | | | | Reverting because the patch broke lldb. llvm-svn: 348931
* [clang-fuzzer] Add explicit dependency on clangSerialization for ↵Alex Bradbury2018-12-121-0/+1
| | | | | | | | | | | clangHandleCXX after rC348907 This library was breaking my -DBUILD_SHARED_LIBS=1 build. rC348915 seemed to miss this case. As this seems an "obvious" fix, I am committing without pre-commit review as per the LLVM developer policy. llvm-svn: 348929
* [OpenCL] Add generic AS to 'this' pointerMikael Nilsson2018-12-121-1/+1
| | | | | | | | | | Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in FunctionProtoType. Differential Revision: https://reviews.llvm.org/D54862 llvm-svn: 348927
* Add explicit dependency on clangSerialization for a bunch of components to ↵Fangrui Song2018-12-129-0/+9
| | | | | | | | | | | | | | | fix -DBUILD_SHARED_LIBS=on build This is a more thorough fix of rC348911. The story about -DBUILD_SHARED_LIBS=on build after rC348907 (Move PCHContainerOperations from Frontend to Serialization) is: 1. libclangSerialization.so defines PCHContainerReader dtor, ... 2. clangFrontend and clangTooling define classes inheriting from PCHContainerReader, thus their DSOs have undefined references on PCHContainerReader dtor 3. Components depending on either clangFrontend or clangTooling cannot be linked unless they have explicit dependency on clangSerialization due to the default linker option -z defs. The explicit dependency could be avoided if libclang{Frontend,Tooling}.so had these undefined references. This patch adds the explicit dependency on clangSerialization to make them build. llvm-svn: 348915
* [libclang] Revert removal of tidy plugin support from libclang introduced in ↵Ivan Donchevskii2018-12-102-0/+22
| | | | | | | | r347496 Differential Revision: https://reviews.llvm.org/D55415 llvm-svn: 348764
* Portable Python script across Python versionSerge Guelton2018-12-031-9/+12
| | | | | | | | Workaround naming and hierarchy changes in BaseHTTPServer and SimpleHTTPServer module. Differential Revision: https://reviews.llvm.org/D55203 llvm-svn: 348184
* Portable Python script across Python versionSerge Guelton2018-12-031-1/+1
| | | | | | | | Python2 supports both backticks and `repr` to access the __repr__ slot. Python3 only supports `repr`. Differential Revision: https://reviews.llvm.org/D55201 llvm-svn: 348182
* Portable Python script across versionSerge Guelton2018-12-032-6/+6
| | | | | | | | | Have all classes derive from object: that's implicitly the default in Python3, it needs to be done explicilty in Python2. Differential Revision: https://reviews.llvm.org/D55121 llvm-svn: 348127
* Portable Python script across Python versionSerge Guelton2018-12-031-9/+9
| | | | | | | | | | | | | | Python2 supports the two following equivalent construct raise ExceptionType, exception_value and raise ExceptionType(exception_value) Only the later is supported by Python3. Differential Revision: https://reviews.llvm.org/D55195 llvm-svn: 348126
* [diagtool] Remove unneeded header includes.Richard Trieu2018-11-282-2/+0
| | | | llvm-svn: 347726
* [libclang] Fix clang_Cursor_getNumArguments and clang_Cursor_getArgument for ↵Ivan Donchevskii2018-11-271-0/+10
| | | | | | | | | | | CXXConstructExpr Constructors have the same methods for arguments as call expressions. Let's provide a way to get their arguments the same way. Differential Revision: https://reviews.llvm.org/D54934 llvm-svn: 347654
* [AArch64] Add aarch64_vector_pcs function attribute to ClangSander de Smalen2018-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | This is the Clang patch to complement the following LLVM patches: https://reviews.llvm.org/D51477 https://reviews.llvm.org/D51479 More information describing the vector ABI and procedure call standard can be found here: https://developer.arm.com/products/software-development-tools/\ hpc/arm-compiler-for-hpc/vector-function-abi Patch by Kerry McLaughlin. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D54425 llvm-svn: 347571
* Remove the optional dependency from libclang to clang-tidy/include-fixerBenjamin Kramer2018-11-232-22/+0
| | | | | | | clangd does a better job on both of these, so don't slow down everyone's build for a poorly working libclang feature. llvm-svn: 347496
* [libclang] Unify getCursorDecl and getCursorParentDeclFangrui Song2018-11-203-15/+10
| | | | | | They do the same thing, thus the latter (which has only 2 call sites) can be deleted. llvm-svn: 347293
* Sink BuryPointer from Clang into LLVM for reuse thereDavid Blaikie2018-11-171-3/+4
| | | | llvm-svn: 347141
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-082-0/+7
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 llvm-svn: 346392
* Revert r346326 [OpenCL] Add support of ↵Andrew Savonichev2018-11-072-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | cl_intel_device_side_avc_motion_estimation This patch breaks Index/opencl-types.cl LIT test: Script: -- : 'RUN: at line 1'; stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl -- Command Output (stderr): -- llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm-svn: 346338
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-072-0/+7
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 llvm-svn: 346326
* Add support for 'atomic_default_mem_order' clause on 'requires' directive. ↵Patrick Lyster2018-11-021-0/+3
| | | | | | Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 llvm-svn: 345967
* [analyzer][CTU] Correctly signal in the function index generation tool if ↵Gabor Horvath2018-11-022-21/+11
| | | | | | | | there was an error Differential Revision: https://reviews.llvm.org/D53979 llvm-svn: 345965
OpenPOWER on IntegriCloud