summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Include full filename range for missing includesErik Verbruggen2016-10-251-0/+8
| | | | | | For the purpose of highlighting in an IDE. llvm-svn: 285057
* Fix 'unknown documentation command' warning rangesErik Verbruggen2016-10-251-0/+4
| | | | | | | | | 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/+442
| | | | | | | | | | | | | | | | | | | | | | +,*,&&,||) 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-8/+19
| | | | | | | Returning `false` was stopping the parsing of further arguments, which wasn't intended. llvm-svn: 285047
* test/CodeGen/builtins.c: reinstate #ifdef __x86_64__ around __builtin_longjmpMehdi Amini2016-10-241-0/+5
| | | | | | Unadvertently removed in r285019 llvm-svn: 285041
* [Sema][ObjC] Warn about implicitly autoreleasing out-parameters capturedAkira Hatanaka2016-10-241-1/+8
| | | | | | | | | | | | | | 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
* Fix test on non-X86 platformsMehdi Amini2016-10-241-0/+5
| | | | | | | This is a fixup for r285019, adding an `#ifdef __x86_64__` since the os_log builtin is platform specific. llvm-svn: 285027
* Fix bug where one of the cases where we mangle a <bare-unresolved-name> failedRichard Smith2016-10-241-0/+7
| | | | | | | | 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-243-3/+239
| | | | | | | | | | | | | | | | | 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-0/+7
| | | | | | 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-243-239/+3
| | | | | | This reverts commit r284990, two opencl test are broken llvm-svn: 285007
* [clang] Remove redundant --check-prefix=CHECK from testsMandeep Singh Grang2016-10-242-2/+2
| | | | | | | | | | | | Reviewers: mkuper, rengolin, hans Subscribers: cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D25893 llvm-svn: 285001
* Fix crash if StmtProfile finds a type-dependent member access for which we haveRichard Smith2016-10-241-0/+9
| | | | | | | | | | | 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-243-3/+239
| | | | | | | | | | | | | | 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
* [analyzer] Fix an ARM buildbot after r284960.Artem Dergachev2016-10-242-2/+2
| | | | | | I guess we should always specify triples in all analyzer tests, regardless. llvm-svn: 284969
* revert r284963 Michael Zuckerman2016-10-241-442/+0
| | | | | | | because new test file is failing in some OS. test/CodeGen/avx512-reduceIntrin.c llvm-svn: 284967
* [X86][AVX512][Clang][Intrinsics][reduce] Adding missing reduce (Operators: ↵Michael Zuckerman2016-10-241-0/+442
| | | | | | | | | | | | | | | | | | +,*,&&,||) 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/+38
| | | | | | | | | | | | 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/+198
| | | | | | | | | | | | | | | 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/+31
| | | | | | | | | | | | | | | | | | 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
* Fix myriad test with CLANG_DEFAULT_CXX_STDLIBJonas Hahnfeld2016-10-241-2/+2
| | | | llvm-svn: 284958
* [AVX-512] Replace 64-bit element and 512-bit vector pmin/pmax builtins with ↵Craig Topper2016-10-243-64/+240
| | | | | | 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-48/+144
| | | | | | 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-36/+60
| | | | llvm-svn: 284936
* [AVX-512] Remove masked 128/256-bit packss/packus builtins and replace with ↵Craig Topper2016-10-231-16/+32
| | | | | | selects and the older unmasked builtins. llvm-svn: 284935
* Fix mangling numbers for varargs lambdas; varargs and non-varargs lambdas getRichard Smith2016-10-231-0/+10
| | | | | | different lambda-sigs, so they should have different counters. llvm-svn: 284933
* [clang] Limit clang test to ARM and AArch64 onlyMandeep Singh Grang2016-10-231-0/+2
| | | | | | | | | | | | | | Summary: Limit clang/test/Frontend/gnu-mcount.c to ARM and AArch64 only. Reviewers: abdulras, honggyu.kim, rengolin Subscribers: aemerson, rengolin, cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D25842 llvm-svn: 284931
* [AVX-512] Replace masked 128/256-bit pavg builtins and replace with select ↵Craig Topper2016-10-221-8/+16
| | | | | | and older unmasked builtins. llvm-svn: 284929
* [AVX-512] Replace masked 128/256-bit saturating add/sub builtins with select ↵Craig Topper2016-10-221-32/+64
| | | | | | and older unmasked builtins. llvm-svn: 284928
* [AVX-512] Replace masked 128/256-bit vpmovzx/vpmovsx builtins with native IR.Craig Topper2016-10-222-48/+96
| | | | llvm-svn: 284927
* [AVX-512] Remove duplicate test cases from the avx512vlbw intrinsic test. ↵Craig Topper2016-10-221-120/+0
| | | | | | These tests already exist in the avx512vl test and represent avx512vl instructions. llvm-svn: 284926
* [AVX-512] Remove masked 128/256-bit pshufb builtins. Replace with a select ↵Craig Topper2016-10-221-4/+8
| | | | | | 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-12/+24
| | | | | | and the older non-masked versions instead. llvm-svn: 284924
* Add another testcase missed from r284905.Richard Smith2016-10-221-0/+13
| | | | llvm-svn: 284906
* [c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic forRichard Smith2016-10-227-16/+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-0/+11
| | | | | | | | 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/+1
| | | | | | | | Emit the actual path to the non-modular include. rdar://28897010 llvm-svn: 284897
* DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.Richard Smith2016-10-2123-73/+434
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [CUDA] Simplify some repeated diagnostic expectations in CUDA tests.Justin Lebar2016-10-214-22/+7
| | | | | | | | Instead of repeating the diagnostic, use "expected-note N". Test-only change. llvm-svn: 284882
* Declare H and H new/delete.Artem Belevich2016-10-211-1/+45
| | | | llvm-svn: 284879
* Remove unnecessary x86 backend requirements from OpenMP testsReid Kleckner2016-10-2152-52/+1
| | | | | | Clang can generate LLVM IR for x86 without a registered x86 backend. llvm-svn: 284836
* Remove non-existing file from modulemap.Benjamin Kramer2016-10-211-1/+0
| | | | | | This picked up a builtin header if it happened to be available. llvm-svn: 284815
* Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' ↵Renato Golin2016-10-2123-434/+73
| | | | | | | | rules." This reverts commit r284800, as it failed all ARM/AArch64 bots. llvm-svn: 284811
* Don't try to use !Previous.empty() as a proxy for "Is this a redeclaration?" --Richard Smith2016-10-211-0/+9
| | | | | | | | | | | we don't collapse that down to a single entry if it's not a redeclaration. Instead, set the Redeclaration bit on the Declarator to indicate whether a function is a redeclaration (which may not have been linked into the redeclaration chain if it's a dependent context friend). Fixes a rejects-valid; see testcase. llvm-svn: 284802
* DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.Richard Smith2016-10-2123-73/+434
| | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 284800
* [Driver][Darwin] Pass -no_deduplicate to ld64Bruno Cardoso Lopes2016-10-211-0/+46
| | | | | | | | | | Recent versions of ld64 run a deduplicate pass, which is on by default. Disable the pass by using -no_deduplicate in certain condition and enhance total compile time. rdar://problem/25455336 llvm-svn: 284798
* [Modules] Add 'no_undeclared_includes' module map attributeBruno Cardoso Lopes2016-10-2121-1/+107
| | | | | | | | | | | | | The 'no_undeclared_includes' attribute should be used in a module to tell that only non-modular headers and headers from used modules are accepted. The main motivation behind this is to prevent dep cycles between system libraries (such as darwin) and libc++. Patch by Richard Smith! llvm-svn: 284797
* Revert 9 changes from r284793, they still fail on some botsReid Kleckner2016-10-209-9/+12
| | | | llvm-svn: 284794
* Remove 24 instances of 'REQUIRES: shell'Reid Kleckner2016-10-2024-50/+25
| | | | | | | | | | | | | | | | | Tests fall into one of the following categories: - The requirement was unnecessary - Additional quoting was required for backslashes in paths (see "sed -e 's/\\/\\\\/g'") in the sanitizer tests. - OpenMP used 'REQUIRES: shell' as a proxy for the test failing on Windows. Those tests fail there reliably, so use XFAIL instead. I tried not to remove shell requirements that were added to suppress flaky test failures, but if I screwed up, we can add it back as needed. llvm-svn: 284793
* Re-commit r284753, reverted in r284778, with a fix for PR30749.Richard Smith2016-10-201-0/+51
| | | | | | | | | | Original commit message: [c++1z] Teach composite pointer type computation how to compute the composite pointer type of two function pointers with different noexcept specifications. While I'm here, also teach it how to merge dynamic exception specifications. llvm-svn: 284785
OpenPOWER on IntegriCloud