summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [Modules] Replace arrays with init lists.Benjamin Kramer2016-11-151-9/+5
| | | | | | | Thi way the compiler can pick the optimal storage duration. It's also more readable. No functional change intended. llvm-svn: 287005
* [analyzer] Add check for when block is called with too few arguments.Devin Coughlin2016-11-155-13/+27
| | | | | | | | | The CallAndMessageChecker has an existing check for when a function pointer is called with too few arguments. Extend this logic to handle the block case, as well. While we're at it, do a drive-by grammar correction ("less" --> "fewer") on the diagnostic text. llvm-svn: 287001
* Fixed spelling in comments. NFCI.Simon Pilgrim2016-11-153-3/+3
| | | | llvm-svn: 286996
* vector load store with length (left justified) clang portionZaara Syeda2016-11-154-9/+393
| | | | llvm-svn: 286994
* test commmitZaara Syeda2016-11-151-1/+0
| | | | llvm-svn: 286977
* [clang-format] Fixed line merging of more than two linesCameron Desrochers2016-11-152-1/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D19063 llvm-svn: 286973
* [PowerPC] Implement BE VSX load/store builtins - clang portion.Tony Jiang2016-11-156-3/+311
| | | | | | | | | | | | This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE, they behaves exactly the same with vec_xl and vec_xst, therefore they are simply implemented by defining a matching macro. On LE, they are implemented by defining new builtins and intrinsics. For int/float/long long/double, it is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short, we also need some extra shuffling before or after call the builtins to get the desired BE order. For int128, simply call vec_xl or vec_xst. llvm-svn: 286971
* [OPENMP] Fix for PR30632: Name mangling issue.Alexey Bataev2016-11-152-6/+10
| | | | | | | | Reworked fix after comments from Richard Smith. We must skip all CapturedDecl-based contexts when trying to get correct mangling number context. llvm-svn: 286953
* [test] Correctly include build llvm_shlib_dir in stand-alone buildsMichal Gorny2016-11-151-1/+6
| | | | | | | | | | | | | | | | Add the build llvm_shlib_dir into LD_LIBRARY_PATH before the directory specified as llvm_libs_dir, in order to fix stand-alone builds attempting to use installed clang libraries. In case of stand-alone builds llvm_libs_dir specifies the location of installed LLVM libraries which can also contain an older version (previous build) of clang libraries. Therefore, ensure to specify llvm_shlib_dir (which is always the build tree path) before the potentially-system llvm_libs_dir. Differential Revision: https://reviews.llvm.org/D26115 llvm-svn: 286952
* [OPENMP] Fixed codegen for 'omp cancel' construct.Alexey Bataev2016-11-153-7/+70
| | | | | | | | | If 'omp cancel' construct is used in a worksharing construct it may cause hanging of the software in case if reduction clause is used. Patch fixes this problem by avoiding extra reduction processing for branches that were canceled. llvm-svn: 286944
* [analyzer] Rename assumeWithinInclusiveRange*()Dominic Chen2016-11-156-62/+60
| | | | | | | | | | | | Summary: The name is slightly confusing, since the constraint is not necessarily within the range unless `Assumption` is true. Split out renaming for ConstraintManager.h from D26061 Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26644 llvm-svn: 286927
* [analyzer] Minor optimization: avoid setting state if unchangedDominic Chen2016-11-151-4/+6
| | | | | | | | | | | | Summary: Split out optimization from D26061 Reviewers: zaks.anna, dcoughlin Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26642 llvm-svn: 286925
* [analyzer] Fix crash in NullabilityChecker calling block with too few argumentsDevin Coughlin2016-11-142-3/+16
| | | | | | | | | Fix a crash when checking parameter nullability on a block invocation with fewer arguments than the block declaration requires. rdar://problem/29237566 llvm-svn: 286901
* [sanitizer] Passthrough CMAKE_OSX_DEPLOYMENT_TARGET when building ↵Kuba Brecka2016-11-141-0/+1
| | | | | | | | | | compiler-rt from clang/runtime/CMakeLists.txt This breaks some Swift builds, because Swift's build scripts explicitly set CMAKE_OSX_DEPLOYMENT_TARGET. This however isn't propagated to the compiler-rt build, causing build errors. Differential Revision: https://reviews.llvm.org/D26558 llvm-svn: 286898
* [PPC] altivec.h functions for converting half precision to single precision.Sean Fertile2016-11-143-0/+40
| | | | | | | | | | Adds 2 vector functions for converting from a vector of unsigned short to a vector of float. One converts the low 4 halfwords and one converts the high 4 halfwords. Differential Revision: https://reviews.llvm.org/D26534 llvm-svn: 286863
* Fix OpenCL test for buildbot by removing extra (erroneous) RUN lineAnastasia Stulova2016-11-141-1/+0
| | | | llvm-svn: 286856
* [OpenCL] Fix for integer parameters of enqueue_kernelAnastasia Stulova2016-11-145-109/+162
| | | | | | | | | | | | | | Make handling integer parameters more flexible: - For the number of events argument allow to pass larger integers than 32 bits as soon as compiler can prove that the range fits in 32 bits. If not, the diagnostic will be given. - Change type of the arguments specifying the sizes of the corresponding block arguments to be size_t. Review: https://reviews.llvm.org/D26509 llvm-svn: 286849
* [clang docs] Minor fix in ClangCheck.rstMandeep Singh Grang2016-11-141-3/+3
| | | | | | | | | | | | Reviewers: djasper, rengolin Subscribers: Eugene.Zelenko Tags: #clang-c Differential Revision: https://reviews.llvm.org/D26484 llvm-svn: 286846
* Fix the unit test darwin-multiarch-arm.c for windowsSumanth Gundapaneni2016-11-141-1/+1
| | | | llvm-svn: 286842
* [OpenCL] Change to clk_event parameter in enqueue_kernel.Anastasia Stulova2016-11-144-30/+47
| | | | | | | | | - Accept NULL pointer as a valid parameter value for clk_event. - Generate clk_event_t arguments of internal __enqueue_kernel_XXX function as pointers in generic address space. Review: https://reviews.llvm.org/D26507 llvm-svn: 286836
* [PPC] add extract sig/exp test data class for vec float and vec double.Sean Fertile2016-11-143-1/+110
| | | | | | | | | | Add vector extract exponent/significand functions to altivec.h, as well as functions (and related constants) to test the data class of vector float and vector double. Differential Revision: https://reviews.llvm.org/D26271 llvm-svn: 286830
* Fix r286819 (accidentally patched multiple times.Pekka Jaaskelainen2016-11-141-18/+0
| | | | llvm-svn: 286821
* [OpenCL] always use SPIR address spaces for kernel_arg_addr_space MDPekka Jaaskelainen2016-11-142-3/+46
| | | | | | | | | | | | | | | It doesn't make sense to use the target's address space ids in this context as this is metadata that should be referring to the "logical" OpenCL address spaces. For flat AS machines like all "CPUs" in general, the logical AS info gets lost as there's only one address space (0). This commit changes the logic such that we always use the SPIR address space ids for the argument metadata. It thus allows implementing the clGetKernelArgInfo() and the other detection needs. https://reviews.llvm.org/D26157 llvm-svn: 286819
* Revert "Improve handling of floating point literals in OpenCL to only use ↵Renato Golin2016-11-144-46/+11
| | | | | | | | double precision if the target supports fp64." This reverts commit r286815, as it broke all ARM and AArch64 bots. llvm-svn: 286818
* Improve handling of floating point literals in OpenCL to only use double ↵Neil Hickey2016-11-144-11/+46
| | | | | | | | | | | | | | precision if the target supports fp64. This change makes sure single-precision floating point types are used if the cl_fp64 extension is not supported by the target. Also removed the check to see whether the OpenCL version is >= 1.2, as this has been incorporated into the extension setting code. Differential Revision: https://reviews.llvm.org/D24235 llvm-svn: 286815
* Remove some false positives when taking the address of packed membersRoger Ferrer Ibanez2016-11-143-25/+236
| | | | | | Differential Revision: https://reviews.llvm.org/D23657 llvm-svn: 286798
* Add explicit (void) cast to result of unique_ptr::release()Eric Fiselier2016-11-141-1/+1
| | | | llvm-svn: 286796
* [AVX-512] Replace masked dword and qword variable shift builtins with ↵Craig Topper2016-11-135-168/+126
| | | | | | | | unmasked builtins and a select. This is part of a set of changes to allow InstCombine in the backend to optimize variable shifts without having to know about masking. llvm-svn: 286757
* [X86] Remove extra escaped new lines in intrinsic headers left over from an ↵Craig Topper2016-11-133-113/+113
| | | | | | earlier conversion away from a macro. NFC llvm-svn: 286756
* Bitcode: Change module reader functions to return an llvm::Expected.Peter Collingbourne2016-11-132-5/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D26562 llvm-svn: 286752
* Fix PR28366: Handle variables from enclosing local scopes more gracefully ↵Faisal Vali2016-11-134-4/+57
| | | | | | | | | | | | | | | | | | during constant expression evaluation. Only look for a variable's value in the constant expression evaluation activation frame, if the variable was indeed declared in that frame, otherwise it might be a constant expression and be usable within a nested local scope or emit an error. void f(char c) { struct X { static constexpr char f() { return c; // error gracefully here as opposed to crashing. } }; int I = X::f(); } llvm-svn: 286748
* [AMDGPU] Add f16 builtin functions (VI+)Konstantin Zhuravlyov2016-11-135-5/+112
| | | | | | Differential Revision: https://reviews.llvm.org/D26476 llvm-svn: 286741
* [AVX-512] Add returns to shift intrinsics that converted from macros in r286714.Craig Topper2016-11-131-3/+3
| | | | llvm-svn: 286738
* Revert r286735 due to test failureBrad Smith2016-11-132-27/+0
| | | | llvm-svn: 286736
* Link static PIE programs against rcrt0.o on OpenBSDBrad Smith2016-11-122-0/+27
| | | | | | Patch by Stefan Kempf. llvm-svn: 286735
* [AVX-512] Use scalar vfmsub/vfnmsub mask3 intrinsics instead of inverting ↵Craig Topper2016-11-123-24/+28
| | | | | | | | | | | | | | the mask argument of a vfmadd intrinsic. Summary: Inverting the mask argument does not reflect the intended semantics of the intrinsic. Reviewers: igorb, delena Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26019 llvm-svn: 286733
* Use descriptive message if list initializer is incorrectly parenthesized.Serge Pavlov2016-11-126-8/+71
| | | | | | | | | | | | | If initializer contains parentheses around braced list where it is not allowed, as in construct int({0}), clang issued message like `functional-style cast from 'void' to 'int' is not allowed`, which does not help much. Both gcc and msvc issue message `list-initializer for non-class type must not be parenthesized`, which is more descriptive. This change implements similar message for clang. Differential Revision: https://reviews.llvm.org/D25816 llvm-svn: 286721
* As we released 3.9, from the 4.0 release notes, points to version 3.9 ↵Sylvestre Ledru2016-11-121-3/+3
| | | | | | instead of 3.8 llvm-svn: 286718
* Add the new option -Og in the release notes. See r286602 for more informationSylvestre Ledru2016-11-121-1/+5
| | | | llvm-svn: 286717
* Add support of the next Ubuntu (17.04 - Zesty Zapus)Sylvestre Ledru2016-11-121-1/+3
| | | | llvm-svn: 286716
* clang-format: Support ObjC selectors with unnamed parameters.Daniel Jasper2016-11-123-9/+53
| | | | | | This fixes llvm.org/PR28063. llvm-svn: 286715
* [AVX-512] Convert the rest of the masked shift by immediate and by single ↵Craig Topper2016-11-128-426/+447
| | | | | | | | element builtins over to the newly added unmasked builtins and a select. This should also fix PR30691 since the new builtins are handled like the legacy builtins in the backend. llvm-svn: 286714
* [analyzer] Update 'Automated' to 'Automatic' from r286694.Devin Coughlin2016-11-122-2/+2
| | | | | | ARC is 'Automatic Reference Counting' and not 'Automated Reference Counting'. llvm-svn: 286700
* [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr.Richard Smith2016-11-122-4/+101
| | | | llvm-svn: 286699
* [analyzer] Fix copy-pasta in NullableReturnedFromNonnullChecker checker name.Devin Coughlin2016-11-122-3/+3
| | | | | | | | | | The name of the NullableReturnedFromNonnullChecker in Checkers.td was accidentally "NullablePassedToNonnull", which made it impossible to explicitly turn the checker on. rdar://problem/28354459 llvm-svn: 286697
* Add instructions in clang get_started page about working with a monorepoMehdi Amini2016-11-121-0/+2
| | | | llvm-svn: 286696
* [analyzer] Improve misleading RetainCountChcker diagnostic under ARCDevin Coughlin2016-11-122-4/+95
| | | | | | | | | | | | | | | | | | | | Under automated reference counting the analyzer treats a methods -- even those starting with 'copy' and friends -- as returning an unowned value. This is because ownership of CoreFoundation objects must be transferred to ARC with __bridge_transfer or CFBridgingRelease() before being returned as ARC-managed bridged objects. Unfortunately this could lead to a poor diagnostic inside copy methods under ARC where the analyzer would complain about a leak of a returned CF value inside a method "whose name does not start with 'copy'" -- even though the name did start with 'copy'. This commit improves the diagnostic under ARC to say inside a method "returned from a method managed by Automated Reference Counting". rdar://problem/28849667 llvm-svn: 286694
* [c++1z] std::byte didn't make itRichard Smith2016-11-121-7/+0
| | | | llvm-svn: 286685
* [c++1z] Two more features have been accepted.Richard Smith2016-11-111-1/+1
| | | | llvm-svn: 286681
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-114-65/+66
| | | | | | This better reflects what it represents. llvm-svn: 286680
OpenPOWER on IntegriCloud