summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Re-apply patch r279045.Kelvin Li2016-10-2513-9/+324
| | | | llvm-svn: 285066
* Include full filename range for missing includesErik Verbruggen2016-10-251-1/+2
| | | | | | For the purpose of highlighting in an IDE. llvm-svn: 285057
* Fix 'unknown documentation command' warning rangesErik Verbruggen2016-10-251-4/+6
| | | | | | | | | Warnings generated by -Wdocumentation-unknown-command did only have a start location, not a full source range. This resulted in only the "carret" being show in messages, and IDEs highlighting only the single initial character. llvm-svn: 285056
* [X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: ↵Michael Zuckerman2016-10-251-0/+237
| | | | | | | | | | | | | | | | | | | | | | +,*,&&,||) intrinsics to Clang Committed after LGTM and check-all Vector-reduction arithmetic accepts vectors as inputs and produces scalars as outputs. This class of vector operation forms the basis of many scientific computations. In vector-reduction arithmetic, the evaluation off is independent of the order of the input elements of V. Used bisection method. At each step, we partition the vector with previous step in half, and the operation is performed on its two halves. This takes log2(n) steps where n is the number of elements in the vector. Reviwer: 1. igorb 2. craig.topper Differential Revision: https://reviews.llvm.org/D25527 llvm-svn: 285054
* Fix handling of %% format specifier in os_log builtins.Mehdi Amini2016-10-251-1/+1
| | | | | | | Returning `false` was stopping the parsing of further arguments, which wasn't intended. llvm-svn: 285047
* Add dependency from clangCodeGen to clangAnalysisMehdi Amini2016-10-241-0/+1
| | | | | | This is unbreaking the build with shared library after r285019. llvm-svn: 285042
* [Basic] Support 32-bit x86 and ARM targets for FuchsiaPetr Hosek2016-10-241-4/+12
| | | | | | | | | Fuchsia has experimental support for 32-bit x86 and ARM targets, add them to the list of supported targets. Differential Revision: https://reviews.llvm.org/D25838 llvm-svn: 285038
* Link clangCodeGen with clangAnalysis required after r284990.Artem Belevich2016-10-241-0/+1
| | | | | | Fixes build break for configurations that use shared libraries. llvm-svn: 285037
* [Sema][ObjC] Warn about implicitly autoreleasing out-parameters capturedAkira Hatanaka2016-10-241-0/+17
| | | | | | | | | | | | | | by blocks. Add a new warning "-Wblock-capture-autoreleasing". The warning warns about implicitly autoreleasing out-parameters captured by blocks which can introduce use-after-free bugs that are hard to debug. rdar://problem/15377548 Differential Revision: https://reviews.llvm.org/D25844 llvm-svn: 285031
* CodeGen: remove incorrect temporary TwineSaleem Abdulrasool2016-10-241-2/+2
| | | | | | Twines should not be stack allocated. This somehow managed to get past me. llvm-svn: 285028
* CodeGen: centralise label construction for method listsSaleem Abdulrasool2016-10-241-59/+107
| | | | | | | | | | | Move all the label construction for the various method list emission into EmitMethodList. Rather than have all the names be constructed in pieces in all of the callers of EmitMethodList, have this occur in one site. This also makes the calls much easier to understand as we simplify identify the type of the method list being emitted and the interface name for which it is being emitted. NFC. llvm-svn: 285023
* Fix bug where one of the cases where we mangle a <bare-unresolved-name> failedRichard Smith2016-10-241-25/+31
| | | | | | | | to emit the <template-args> portion. Refactor so that mangleUnresolvedName actually emits the entire <unresolved-name>, so this mistake is harder to make again. llvm-svn: 285022
* Add support for __builtin_os_log_format[_buffer_size]Mehdi Amini2016-10-247-77/+547
| | | | | | | | | | | | | | | | | This reverts commit r285007 and reapply r284990, with a fix for the opencl test that I broke. Original commit message follows: These new builtins support a mechanism for logging OS events, using a printf-like format string to specify the layout of data in a buffer. The _buffer_size version of the builtin can be used to determine the size of the buffer to allocate to hold the data, and then __builtin_os_log_format can write data into that buffer. This implements format checking to report mismatches between the format string and the data arguments. Most of this code was written by Chris Willmore. Differential Revision: https://reviews.llvm.org/D25888 llvm-svn: 285019
* Fix mangling of implicit calls to operator-> to only include a single "pt",Richard Smith2016-10-241-1/+4
| | | | | | rather than including an extra one for each level of 'operator->()' invoked. llvm-svn: 285015
* Revert "Add support for __builtin_os_log_format[_buffer_size]"Mehdi Amini2016-10-247-546/+77
| | | | | | This reverts commit r284990, two opencl test are broken llvm-svn: 285007
* [analyzer] Use unsigned integers to rely on well-defined overflow semantics.Artem Dergachev2016-10-241-5/+5
| | | | | | Found by the UBSan buildbot. llvm-svn: 285000
* Fix crash if StmtProfile finds a type-dependent member access for which we haveRichard Smith2016-10-241-0/+6
| | | | | | | | | | | resolved the -> to a call to a specific operator-> function. The particular test case added here is actually being mishandled: the implicit member access should not be type-dependent (because it's accessing a non-type-dependent member of the current instantiation), but calls to a type-dependent operator-> that is a member of the current instantiation would be liable to hit the same codepath. llvm-svn: 284999
* Add support for __builtin_os_log_format[_buffer_size]Mehdi Amini2016-10-247-77/+546
| | | | | | | | | | | | | | These new builtins support a mechanism for logging OS events, using a printf-like format string to specify the layout of data in a buffer. The _buffer_size version of the builtin can be used to determine the size of the buffer to allocate to hold the data, and then __builtin_os_log_format can write data into that buffer. This implements format checking to report mismatches between the format string and the data arguments. Most of this code was written by Chris Willmore. Differential Revision: https://reviews.llvm.org/D25888 llvm-svn: 284990
* revert r284963 Michael Zuckerman2016-10-241-237/+0
| | | | | | | because new test file is failing in some OS. test/CodeGen/avx512-reduceIntrin.c llvm-svn: 284967
* Adjust for TimePoint interface change in llvm: D25730. NFCPavel Labath2016-10-241-3/+5
| | | | llvm-svn: 284964
* [X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: ↵Michael Zuckerman2016-10-241-0/+237
| | | | | | | | | | | | | | | | | | +,*,&&,||) intrinsics to Clang Committed after LGTM and check-all Vector-reduction arithmetic accepts vectors as inputs and produces scalars as outputs. This class of vector operation forms the basis of many scientific computations. In vector-reduction arithmetic, the evaluation off is independent of the order of the input elements of V. Used bisection method. At each step, we partition the vector with previous step in half, and the operation is performed on its two halves. This takes log2(n) steps where n is the number of elements in the vector. Differential Revision: https://reviews.llvm.org/D25527 llvm-svn: 284963
* [Sema] Formatting warnings should see through Objective-C message sendsAlex Lorenz2016-10-241-0/+14
| | | | | | | | | | | | This commit improves the '-Wformat' warnings by ensuring that the formatting checker can see through Objective-C message sends when we are calling an Objective-C method with an appropriate format_arg attribute. rdar://23622446 Differential Revision: https://reviews.llvm.org/D25820 llvm-svn: 284961
* [analyzer] Add StdLibraryFunctions checker.Artem Dergachev2016-10-242-0/+944
| | | | | | | | | | | | | | | This checker does not emit reports, however it influences the analysis by providing complete summaries for, or otherwise improving modeling of, various standard library functions. This should reduce the number of infeasible paths explored during analysis. The custom function summary format used in this checker is superior to body farms by causing less unnecessary state splits, which would result in better analysis performance. Differential Revision: https://reviews.llvm.org/D20811 llvm-svn: 284960
* [Sema][TreeTransform] Re-create DesignatedInitExpr when a field designatorAlex Lorenz2016-10-241-0/+13
| | | | | | | | | | | | | | | | | | has no field declaration. This commit fixes an invalid Winitializer-overrides warning that's shown when analyzing a second (or any after the first) instantiation of a designated initializer. This invalid warning is fixed by making sure that a DesignatedInitExpr is rebuilt by the tree transformer when it has a field designator whose FieldDecl* hasn't been yet initialized. This ensures that a different DesignatedInitExpr is processed by Sema for every instantiation, and thus the invalid warning is avoided. rdar://28768441 Differential Revision: https://reviews.llvm.org/D25777 llvm-svn: 284959
* [AVX-512] Replace 64-bit element and 512-bit vector pmin/pmax builtins with ↵Craig Topper2016-10-241-17/+44
| | | | | | native IR like we do for 128/256-bit, but with the addition of masking. llvm-svn: 284956
* [AVX-512] Replace masked 128/256-bit byte, word, and dword min/max builtins ↵Craig Topper2016-10-232-262/+190
| | | | | | with selects and the older unmasked builtins. llvm-svn: 284954
* [AVX-512] Replace 512-bit pmovzx/sx builtins with native IR.Craig Topper2016-10-232-168/+126
| | | | llvm-svn: 284936
* [AVX-512] Remove masked 128/256-bit packss/packus builtins and replace with ↵Craig Topper2016-10-231-85/+64
| | | | | | selects and the older unmasked builtins. llvm-svn: 284935
* Add more doxygen comments to emmintrin.h's intrinsics.Ekaterina Romanova2016-10-231-6/+722
| | | | | | | | | | | With this patch, all intrinsics in this file (with an exception of a handful of a recently added ones) will be documented. I will send out a patch for 4 missining intrisics later. The doxygen comments are automatically generated based on Sony's intrinsics document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. This patch was internally reviewed by Yunzhong Gao. llvm-svn: 284934
* Fix mangling numbers for varargs lambdas; varargs and non-varargs lambdas getRichard Smith2016-10-231-2/+3
| | | | | | different lambda-sigs, so they should have different counters. llvm-svn: 284933
* [AVX-512] Replace masked 128/256-bit pavg builtins and replace with select ↵Craig Topper2016-10-221-44/+32
| | | | | | and older unmasked builtins. llvm-svn: 284929
* [AVX-512] Replace masked 128/256-bit saturating add/sub builtins with select ↵Craig Topper2016-10-221-177/+129
| | | | | | and older unmasked builtins. llvm-svn: 284928
* [AVX-512] Replace masked 128/256-bit vpmovzx/vpmovsx builtins with native IR.Craig Topper2016-10-222-211/+187
| | | | llvm-svn: 284927
* [AVX-512] Remove masked 128/256-bit pshufb builtins. Replace with a select ↵Craig Topper2016-10-221-22/+16
| | | | | | and the older unmaksed builtins. llvm-svn: 284925
* [AVX-512] Remove builtins for 128/256-bit pabsb/pabsw. We can use a select ↵Craig Topper2016-10-222-49/+47
| | | | | | and the older non-masked versions instead. llvm-svn: 284924
* [AVX-512] Add typecasts to alignr intrinsics that were modified in r284920.Craig Topper2016-10-221-8/+8
| | | | llvm-svn: 284923
* [AVX-512] Remove masked 128/256-bit palignr builtins. We can just use a ↵Craig Topper2016-10-223-20/+12
| | | | | | select in the header file with the older unmasked versions instead. llvm-svn: 284920
* [c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic forRichard Smith2016-10-224-36/+86
| | | | | | | | | | | | | | mismatched dynamic exception specifications in expressions from an error to a warning, since this is no longer ill-formed in C++1z. Allow reference binding of a reference-to-non-noexcept function to a noexcept function lvalue. As defect resolutions, also allow a conditional between noexcept and non-noexcept function lvalues to produce a non-noexcept function lvalue (rather than decaying to a function pointer), and allow function template argument deduction to deduce a reference to non-noexcept function when binding to a noexcept function type. llvm-svn: 284905
* Module: correctly set the module file kind when emitting file_modified.Manman Ren2016-10-211-1/+8
| | | | | | | | rdar://28503343 Differential Revision: http://reviews.llvm.org/D25806 llvm-svn: 284899
* Module: improve the diagnostic message for include of non-modular header.Manman Ren2016-10-211-1/+2
| | | | | | | | Emit the actual path to the non-modular include. rdar://28897010 llvm-svn: 284897
* Remove unnecessary distinction between Ref_Compatible andRichard Smith2016-10-213-13/+9
| | | | | | | Ref_Compatible_With_Added_Qualification. We always treated these two values the same way. llvm-svn: 284895
* DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.Richard Smith2016-10-213-131/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | This has two significant effects: 1) Direct relational comparisons between null pointer constants (0 and nullopt) and pointers are now ill-formed. This was always the case for C, and it appears that C++ only ever permitted by accident. For instance, cases like nullptr < &a are now rejected. 2) Comparisons and conditional operators between differently-cv-qualified pointer types now work, and produce a composite type that both source pointer types can convert to (when possible). For instance, comparison between 'int **' and 'const int **' is now valid, and uses an intermediate type of 'const int *const *'. Clang previously supported #2 as an extension. We do not accept the cases in #1 as an extension. I've tested a fair amount of code to check that this doesn't break it, but if it turns out that someone is relying on this, we can easily add it back as an extension. This is a re-commit of r284800. llvm-svn: 284890
* Switch SmallSetVector to use DenseSet when it overflows its inline space.Justin Lebar2016-10-213-6/+10
| | | | | | | | | | | | | | | | | | | | Summary: SetVector already used DenseSet, but SmallSetVector used std::set. This leads to surprising performance differences. Moreover, it means that the set of key types accepted by SetVector and SmallSetVector are quite different! In order to make this change, we had to convert some callsites that used SmallSetVector<std::string, N> to use SmallSetVector<CachedHashString, N> instead. Reviewers: timshen Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25648 llvm-svn: 284887
* [Sema] Store a SourceRange for multi-token builtin typesMalcolm Parsons2016-10-212-20/+22
| | | | | | | | | | | | | | | | | | | Summary: clang-tidy's modernize-use-auto check uses the SourceRange of a TypeLoc when replacing the type with auto. This was producing the wrong result for multi-token builtin types like long long: -long long *ll = new long long(); +auto long *ll = new long long(); Reviewers: alexfh, hokein, rsmith, Prazek, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25363 llvm-svn: 284885
* Declare H and H new/delete.Artem Belevich2016-10-211-22/+33
| | | | llvm-svn: 284879
* Remove accidentally checked in assert.Vassil Vassilev2016-10-211-3/+0
| | | | | | Thanks to Manman for spotting this. llvm-svn: 284877
* [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.Justin Lebar2016-10-211-1/+1
| | | | | | | | | | | | Summary: NFC Reviewers: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25797 llvm-svn: 284869
* Remove move constructors that are identical to the generated default move ctor.Benjamin Kramer2016-10-213-15/+2
| | | | llvm-svn: 284856
* Removed unused function argument. NFC.Artem Belevich2016-10-212-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D25839 llvm-svn: 284843
* Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' ↵Renato Golin2016-10-213-134/+131
| | | | | | | | rules." This reverts commit r284800, as it failed all ARM/AArch64 bots. llvm-svn: 284811
OpenPOWER on IntegriCloud