summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Put ext_implicit_lib_function_decl in ImplicitFunctionDeclare.Ed Schouten2015-09-042-2/+2
| | | | | | | | | | | | | | If we build with -Werror=implicit-function-declaration, only implicit function declarations of non-library functions throw compiler errors. For library functions, we only produce a warning. There is no way to promote both of these cases to an error without promoting other warnings. It makes little sense to introduce an additional compiler flag just to control this specific warning. In my opinion it should just be part of the same group. llvm-svn: 246857
* [OPENMP] Fix false diagnostic on instantiation-dependent exprs for atomic ↵Alexey Bataev2015-09-042-3/+10
| | | | | | | | constructs. Some of instantiation-dependent expressions could cause false diagnostic to be emitted about unsupported atomic constructs. Relaxed rules for detection of incorrect expressions. llvm-svn: 246853
* clang/test/SemaCXX/sourceranges.cpp: Fix silly expressions. Sorry for the ↵NAKAMURA Takumi2015-09-041-3/+3
| | | | | | breakage. llvm-svn: 246850
* clang/test/SemaCXX/sourceranges.cpp: Appease win32. Class method is thiscall ↵NAKAMURA Takumi2015-09-041-2/+2
| | | | | | for targeting i686-(msvc|mingw32). llvm-svn: 246849
* [OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trapAlexey Bataev2015-09-048-23/+81
| | | | | | Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later. llvm-svn: 246846
* Fix the perentheses location when the constructor is called on a class that ↵Olivier Goffart2015-09-041-1/+14
| | | | | | has a destructor llvm-svn: 246844
* [X86-64] Allow additional register names in inline assembler.Alexey Bataev2015-09-041-0/+53
| | | | | | | Patch allows to recognize additional registers x8d, x8b, x8w - x15d, x15b, x15w in inline assembler, already recognized by backend Differential Revision: http://reviews.llvm.org/D12594 llvm-svn: 246835
* [Static Analyzer] Remove sinks from nullability checks.Gabor Horvath2015-09-031-0/+62
| | | | | | Differential Revision: http://reviews.llvm.org/D12445 llvm-svn: 246818
* Refactored dtor sanitizing into EHScopeStackNaomi Musgrave2015-09-033-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Dtor sanitization handled amidst other dtor cleanups, between cleaning bases and fields. Sanitizer call pushed onto stack of cleanup operations. Reviewers: eugenis, kcc Differential Revision: http://reviews.llvm.org/D12022 Refactoring dtor sanitizing emission order. - Support multiple inheritance by poisoning after member destructors are invoked, and before base class destructors are invoked. - Poison for virtual destructor and virtual bases. - Repress dtor aliasing when sanitizing in dtor. - CFE test for dtor aliasing, and repression of aliasing in dtor code generation. - Poison members on field-by-field basis, with collective poisoning of trivial members when possible. - Check msan flags and existence of fields, before dtor sanitizing, and when determining if aliasing is allowed. - Testing sanitizing bit fields. llvm-svn: 246815
* [WebAssembly] Initial WebAssembly support in clangDan Gohman2015-09-0315-3/+1219
| | | | | | | | | | This implements basic support for compiling (though not yet assembling or linking) for a WebAssembly target. Note that ABI details are not yet finalized, and may change. Differential Revision: http://reviews.llvm.org/D12002 llvm-svn: 246814
* Thread safety analysis: the NO_THREAD_SAFETY_ANALYSIS attribute will nowDeLesley Hutchins2015-09-031-0/+55
| | | | | | | disable checking of arguments to the function, which is done by -Wthread-safety-reference. llvm-svn: 246806
* Add target flag to clang-cl invocation in this test.Alexey Samsonov2015-09-031-1/+1
| | | | llvm-svn: 246804
* Add -target flag to Clang invocations in this test.Alexey Samsonov2015-09-031-9/+9
| | | | | | ASan may not be supported for the default target triple. llvm-svn: 246795
* [libclang] Return deduced type for auto type, not the one written in the source.Manuel Klimek2015-09-031-1/+26
| | | | | | | | | | | | It used to work, but was accidentally broken by r179769. The issue with decayed types was fixed by r190796. So this patch partially reverts r179769, and adds more tests. This also fixes PR 18669. Patch by Sergey Kalinichev. llvm-svn: 246778
* Implement ACLE 2.0 macros of chapters 6.4 and 6.5 for [ARM] and [Aarch64] ↵Alexandros Lamprineas2015-09-033-53/+268
| | | | | | | | | targets. Differential Revision: http://reviews.llvm.org/D12244 Change-Id: Iffd4e822c15e18668fe8868278230ff232ef50aa llvm-svn: 246768
* [mips] Added support for choosing between traps and breaks in the integrated ↵Daniel Sanders2015-09-031-0/+24
| | | | | | | | | | | | | | | | assembler macros. Summary: The command line options for these are -Wa,--trap and -Wa,--break. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11676 llvm-svn: 246765
* [ARM] Allow passing/returning of __fp16 argumentsOliver Stannard2015-09-033-1/+24
| | | | | | | | | | | | | | | | | | | | | The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246764
* Revert 246755 as it breaks buildbotsOliver Stannard2015-09-033-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | Original commit message: [ARM] Allow passing/returning of __fp16 arguments The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246760
* [OPENMP] Fix for http://llvm.org/PR24687: ICE on compilation of R package TPmsm.Alexey Bataev2015-09-031-3/+4
| | | | | | Fixed capturing of VLAs in 'private' clause of the OpenMP directives. llvm-svn: 246757
* [ARM] Allow passing/returning of __fp16 argumentsOliver Stannard2015-09-033-1/+24
| | | | | | | | | | | | | | | | | | | | | The ACLE (ARM C Language Extensions) 2.0 allows the __fp16 type to be used as a functon argument or return type (ACLE 1.1 did not). The current public release of the AAPCS (2.09) states that __fp16 values should be converted to single-precision before being passed or returned, but AAPCS 2.10 (to be released shortly) changes this, so that they are passed in the least-significant 16 bits of either a GPR (for base AAPCS) or a single-precision register (for AAPCS-VFP). This does not change how arguments are passed if they get passed on the stack. This patch brings clang up to compliance with the latest versions of both of these specs. We can now set the __ARM_FP16_ARGS ACLE predefine, and we have always been able to set the __ARM_FP16_FORMAT_IEEE predefine (we do not support the alternative format). llvm-svn: 246755
* [OPENMP 4.1] Codegen for extended format of 'if' clause.Alexey Bataev2015-09-039-37/+41
| | | | | | Fixed codegen for extended format of 'if' clauses with special 'directive-name-modifier' + ast-print tests for extended format of 'if' clause. llvm-svn: 246748
* [OPENMP 4.1] Parsing/sema analysis for extended format of 'if' clause.Alexey Bataev2015-09-0311-12/+160
| | | | | | | | | | | | | | | | | OpenMP 4.1 added special 'directive-name-modifier' to the 'if' clause. Format of 'if' clause is as follows: ``` if([ directive-name-modifier :] scalar-logical-expression) ``` The restriction rules are also changed. 1. If any 'if' clause on the directive includes a 'directive-name-modifier' then all 'if' clauses on the directive must include a 'directive-name-modifier'. 2. At most one 'if' clause without a 'directive-name-modifier' can appear on the directive. 3. At most one 'if' clause with some particular 'directive-name-modifier' can appear on the directive. 'directive-name-modifier' is important for combined directives and allows to separate conditions in 'if' clause for simple sub-directives in combined directive. This 'directive-name-modifier' identifies the sub-directive to which this 'if' clause must be applied. llvm-svn: 246747
* [modules] Tighten up this test a bit.Sean Silva2015-09-021-5/+6
| | | | llvm-svn: 246702
* 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
OpenPOWER on IntegriCloud