summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output.Ivan Krasin2015-09-023-3/+15
| | | | | | | | | | | | | | | | | Summary: Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output. Introduce a frontend option -fdepfile-entry, and only insert them for the user-defined sanitizer blacklists. In frontend, grab ExtraDeps from -fdepfile-entry, instead of -fsanitize-blacklist. Reviewers: rsmith, pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12544 llvm-svn: 246700
* add __builtin_unpredictable and convert to metadataSanjay Patel2015-09-021-0/+38
| | | | | | | | | | | | | | | | | | | | | | | This patch depends on r246688 (D12341). The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details): int foo(); int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; } int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; } Differential Revision: http://reviews.llvm.org/D12458 llvm-svn: 246699
* [MS ABI] Number unnamed TagDecls which aren't externally visibleDavid Majnemer2015-09-021-0/+16
| | | | | | | | | | | | TagDecls (structs, enums, etc.) may have the same name for linkage purposes of one another; to disambiguate, we add a number to the mangled named. However, we didn't do this if the TagDecl has a pseudo-name for linkage purposes (it was defined alongside a DeclaratorDecl or a TypeNameDecl). This fixes PR24651. llvm-svn: 246659
* [Shave]: pass through more clang options to moviCompileDouglas Katzman2015-09-021-4/+4
| | | | llvm-svn: 246652
* [Sema] Avoid crash on tag-type mismatch (Fixes PR24610)Vedant Kumar2015-09-021-0/+4
| | | | | | Differential Revision: http://reviews.llvm.org/D12444 llvm-svn: 246618
* Fix assertion failure in TransformOpaqueValueExprHubert Tong2015-09-011-0/+6
| | | | | | | | | | | | | | | | | | | | Summary: `OpaqueValueExpr`s may not have a source expression (as in the case when they are created due to a default argument error). This can cause an assertion failure in `TransformOpaqueValueExpr` during template instantiation. This patch fixes the assertion failure. Reviewers: hfinkel, rsmith Subscribers: fraggamuffin, cfe-commits Differential Revision: http://reviews.llvm.org/D11582 Patch by Rachel Craik! llvm-svn: 246600
* Re-commit r246497 (and dependent changes r246524 and r246521), reverted inRichard Smith2015-09-012-2/+8
| | | | | | | | | | | | | | | | | | | r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015 rejects-valid. Original commit message: [modules] Rework serialized DeclContext lookup table management. Instead of walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). llvm-svn: 246582
* Fix typo in testEli Bendersky2015-09-011-2/+2
| | | | llvm-svn: 246573
* Add a new frontend warning for referencing members from the handler of a ↵Aaron Ballman2015-09-012-5/+101
| | | | | | | | constructor or destructor function-try-block, which is UB in C++. This corresponds to the CERT secure coding rule ERR53-CPP. llvm-svn: 246548
* Reverting r246497 (which requires also reverting r246524 and r246521 to ↵Aaron Ballman2015-09-012-8/+2
| | | | | | | | | | | avoid merge conflicts). It broke the build on MSVC 2015. It also broke an MSVC 2013 bot with testing issues. llvm\tools\clang\lib\serialization\MultiOnDiskHashTable.h(117): error C2065: 'Files': undeclared identifier http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/2917 llvm-svn: 246546
* Don't use fprintf to emit this diagnostic!Richard Smith2015-09-011-0/+3
| | | | llvm-svn: 246526
* [modules] Preserve DeclID order when merging lookup tables to give a moreRichard Smith2015-09-012-4/+4
| | | | | | | | predictable diagnostic experience. The hash-of-DeclID order we were using before gave different results on Win32 due to a different predefined declaration of __builtin_va_list. llvm-svn: 246521
* Fix path seperator for Windows.Yaron Keren2015-09-011-3/+3
| | | | llvm-svn: 246520
* [PowerPC] Support __builtin_ppc_get_timebaseHal Finkel2015-08-311-0/+7
| | | | | | | | | | GCC 4.8+ has a PowerPC-specific intrinsic, __builtin_ppc_get_timebase, to do what Clang's __builtin_readcyclecounter does. For compatibility with code that uses GCC's spelling (including glibc), support it as well. Partially fixes PR23681. llvm-svn: 246510
* [modules] Rework serialized DeclContext lookup table management. Instead ofRichard Smith2015-08-312-3/+9
| | | | | | | | | | | | | walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). llvm-svn: 246497
* Fix CHECK directives that weren't checking.Hans Wennborg2015-08-3110-25/+26
| | | | llvm-svn: 246492
* Revert r246345 until an assertion is fixed.Gabor Horvath2015-08-311-697/+0
| | | | llvm-svn: 246479
* Stop hardcoding GCC paths in crt/ld.so lookup.Rafael Espindola2015-08-317-0/+16
| | | | | | | | | | This patch refactors the code to use the GCC installation detector (modified so that it works in Solaris), and uses ToolChain::GetFilePath everywhere once it works. Patch by Xan López <xan@igalia.com>! llvm-svn: 246473
* [MS ABI] Correctly mangle classes without names for linkage purposesDavid Majnemer2015-08-312-0/+47
| | | | | | | | | | | | | | | | A class without a name for linkage purposes gets a name along the lines of <unnamed-type-foo> where foo is either the name of a declarator which defined it (like a variable or field) or a typedef-name (like a typedef or alias-declaration). We handled the declarator case correctly but it would fall down during template instantiation if the declarator didn't share the tag's type. We failed to handle the typedef-name case at all. Instead, keep track of the association between the two and keep it up to date in the face of template instantiation. llvm-svn: 246469
* [CUDA] fix codegen for __nvvm_atom_min/max_gen_u*Jingyue Wu2015-08-311-10/+10
| | | | | | | | | | | | Summary: Clang should emit "atomicrmw umin/umax" instead of "atomicrmw min/max". Reviewers: eliben, tra Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12487 llvm-svn: 246455
* PR17829: Proper diagnostic of mangled names conflictsAndrey Bokhanko2015-08-311-1/+35
| | | | | | | | | | Proper diagnostic and resolution of mangled names conflicts between C++ methods and C functions. This patch implements support for functions/methods only; support for variables is coming separately. Differential Revision: http://reviews.llvm.org/D11297 llvm-svn: 246438
* [OPENMP 4.0] Codegen for array sections.Alexey Bataev2015-08-311-15/+78
| | | | | | Added codegen for array section in 'depend' clause of 'task' directive. It emits to pointers, one for the begin of array section and another for the end of array section. Size of the section is calculated as (end + 1 - start) * sizeof(basic_element_type). llvm-svn: 246422
* [OpenCL] Improve diagnostics detecting implicit vector conversion.Alexey Bader2015-08-301-2/+2
| | | | | | | | Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12470 llvm-svn: 246393
* Fix test for Release builds, the label form is <label>:14, not <label>14.Yaron Keren2015-08-301-6/+6
| | | | llvm-svn: 246391
* Make test resistant to false matches of numbered (unnamed) labels inside ↵Yaron Keren2015-08-301-4/+9
| | | | | | | | | | | other numbers. In release builds labels are numbers. Matching just the number may result in false matches where the label is contained in other numbers, such as 14 inside [114 x i8]. A stricter match requiring start of line or > character before the label avoids these false matches. llvm-svn: 246385
* [X86] Reapplied r246204, r246206, r246211, r246223Simon Pilgrim2015-08-294-4/+136
| | | | | | | | (Re)added debug codegen test for F16C, FMA4, XOP + 3DNow! intrinsics Part of PR24590 llvm-svn: 246363
* [AST] Don't crash when comparing incomplete objectDavid Majnemer2015-08-291-0/+4
| | | | | | | | | | We cannot tell if an object is past-the-end if its type is incomplete. Zero sized objects satisfy past-the-end criteria and our object might turn out to be such an object. This fixes PR24622. llvm-svn: 246359
* Add a check for a function we're not testing.Eric Christopher2015-08-291-0/+1
| | | | llvm-svn: 246355
* PR24612: Don't bail out of checking a constexpr function before checkingRichard Smith2015-08-281-3/+11
| | | | | | | whether it can ever produce a constant expression in the case where it has a void return type and no return statements. llvm-svn: 246347
* [analyzer] When memcpy'ing into a fixed-size array, do not invalidate entire ↵Devin Coughlin2015-08-281-0/+697
| | | | | | | | | | | | | | | | | | region. Change the analyzer's modeling of memcpy to be more precise when copying into fixed-size array fields. With this change, instead of invalidating the entire containing region the analyzer now invalidates only offsets for the array itself when it can show that the memcpy stays within the bounds of the array. This addresses false positive memory leak warnings of the kind reported by krzysztof in https://llvm.org/bugs/show_bug.cgi?id=22954 A patch by Pierre Gousseau! Differential Revision: http://reviews.llvm.org/D11832 llvm-svn: 246345
* Allow TLS vars in dllimport/export functions; only inline dllimport ↵Hans Wennborg2015-08-283-1/+62
| | | | | | | | | | | | | | | | | | | | | functions when safe (PR24593) This patch does two things: 1) Don't error about dllimport/export on thread-local static local variables. We put those attributes on static locals in dllimport/export functions implicitly in case the function gets inlined. Now, for TLS variables this is a problem because we can't import such variables, but it's a benign problem becase: 2) Make sure we never inline a dllimport function TLS static locals. In fact, never inline a dllimport function that references a non-imported function or variable (because these are not defined in the importing library). This seems to match MSVC's behaviour. Differential Revision: http://reviews.llvm.org/D12422 llvm-svn: 246338
* Revert "[X86][3DNow] Added debug codegen test for 3DNow! intrinsics"Renato Golin2015-08-281-26/+1
| | | | | | This reverts commit r246223, as it broke all ARM/AArch64 bots. llvm-svn: 246323
* Revert "[X86][XOP] Added debug codegen test for XOP intrinsics"Renato Golin2015-08-281-66/+1
| | | | | | This reverts commit r246211, as it broke all ARM/AArch64 bots. llvm-svn: 246321
* Revert "[X86][FMA4] Added debug codegen test for FMA4 intrinsics"Renato Golin2015-08-281-34/+1
| | | | | | This reverts commit r246206, as it broke all ARM/AArch64 bots. llvm-svn: 246320
* Revert "[X86][F16C] Added debug codegen test for F16C intrinsics"Renato Golin2015-08-281-6/+1
| | | | | | This reverts commit r246204, as it was breaking all ARM/AArch64 bots. llvm-svn: 246319
* Revert "[OPENMP 4.0] Codegen for array sections."Daniel Jasper2015-08-281-78/+15
| | | | | | | The test is currently failing on bots: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/12747/ llvm-svn: 246288
* Revert r246214 and r246213Steven Wu2015-08-286-336/+24
| | | | | | These two commits causes llvm LTO bootstrap to hang in ScalarEvolution. llvm-svn: 246282
* [OPENMP 4.0] Codegen for array sections.Alexey Bataev2015-08-281-15/+78
| | | | | | Added codegen for array section in 'depend' clause of 'task' directive. It emits to pointers, one for the begin of array section and another for the end of array section. Size of the section is calculated as (end + 1 - start) * sizeof(basic_element_type). llvm-svn: 246278
* PR24597: Fix in-place evaluation of call expressions to provide a proper "this"Richard Smith2015-08-282-0/+13
| | | | | | pointer to an RVO construction of a returned object. llvm-svn: 246263
* Fix macro backtrace printing.Richard Trieu2015-08-271-0/+50
| | | | | | | | Sometimes, a macro that expands to another macro name will not be printed in the macro backtrace. This patch finds the missed macro expansions and prints them. Fixes PR16799 llvm-svn: 246237
* [X86] Bump Darwin MaxVectorAlign to 64 when AVX512 is enabled.Ahmed Bougacha2015-08-271-0/+10
| | | | | | | | | | | Without this, 64-byte vector types (__m512), specified to be 64-byte aligned in the AVX512 draft SysV ABI, will only be 32-byte aligned. This is analoguous to AVX, for which we accept 32-byte max alignment. Differential Revision: http://reviews.llvm.org/D10724 llvm-svn: 246230
* [X86] Conditionalize Darwin MaxVectorAlign on the presence of AVX.Ahmed Bougacha2015-08-271-13/+26
| | | | | | | | | There's no point in using a larger alignment if we have no instructions that would benefit from it. Differential Revision: http://reviews.llvm.org/D12389 llvm-svn: 246229
* [X86] Use AVX features instead of ABI to init. SimdDefaultAlign.Ahmed Bougacha2015-08-271-0/+3
| | | | | | | | | | | | | | | The ABI string only exists to communicate with TargetCodeGenInfo. Concretely, since we only used "avx*" ABI strings on x86_64 (as AVX doesn't affect the i386 ABIs), this meant that, when initializing SimdDefaultAlign, we would ignore AVX/AVX512 on i386, for no good reason. Instead, directly check the features. A similar change for MaxVectorAlign will follow. Differential Revision: http://reviews.llvm.org/D12390 llvm-svn: 246228
* [X86][3DNow] Added debug codegen test for 3DNow! intrinsicsSimon Pilgrim2015-08-271-1/+26
| | | | | | Part of PR24590 llvm-svn: 246223
* Assume loads fix #2Piotr Padlewski2015-08-274-15/+138
| | | | | | | | | | | | | There was linker problem, and it turns out that it is not always safe to refer to vtable. If the vtable is used, then we can refer to it without any problem, but because we don't know when it will be used or not, we can only check if vtable is external or it is safe to to emit it speculativly (when class it doesn't have any inline virtual functions). It should be fixed in the future. http://reviews.llvm.org/D12385 llvm-svn: 246214
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-08-277-19/+208
| | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479. http://reviews.llvm.org/D11859 llvm-svn: 246213
* [X86][XOP] Added debug codegen test for XOP intrinsicsSimon Pilgrim2015-08-271-1/+66
| | | | | | Part of PR24590 llvm-svn: 246211
* [X86][FMA4] Added debug codegen test for FMA4 intrinsicsSimon Pilgrim2015-08-271-1/+34
| | | | | | Part of PR24590 llvm-svn: 246206
* [X86][F16C] Added debug codegen test for F16C intrinsicsSimon Pilgrim2015-08-271-1/+6
| | | | | | Part of PR24590 llvm-svn: 246204
* [X86] Add __builtin_ia32_undef* intrinsics to testSimon Pilgrim2015-08-271-0/+3
| | | | | | Minor tweak to rL246083 llvm-svn: 246200
OpenPOWER on IntegriCloud