summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Don't warn about use of deprecated API when the containing context is ↵Jordan Rose2015-04-301-6/+6
| | | | | | | | | | unavailable. This probably won't come up much, but it seems tidier. Related to rdar://problem/20713550 llvm-svn: 236242
* Batch up access-related diagnostics on enum constants until the whole enum ↵Jordan Rose2015-04-301-0/+81
| | | | | | | | | | is parsed. That way we can take any trailing availability attributes into account. rdar://problem/20713550 llvm-svn: 236241
* [MS ABI] Correctly make paths through covariant virtual basesDavid Majnemer2015-04-302-1/+28
| | | | | | | | | | | | There can be multiple virtual bases which are on the path to a vfptr when one vbase virtually inherits from another. We should prefer the most derived virtual base which covariantly overrides a method in the vfptr class; if we do not lengthen the path this way, we will end up with too few vftable entries. This fixes PR21073. llvm-svn: 236239
* AVX-512: Added AVX-512 intrinsics and testsElena Demikhovsky2015-04-302-0/+395
| | | | | | by Asaf Badouh (asaf.badouh@intel.com) llvm-svn: 236218
* [OPENMP] Mark test as not compatible with MS Windows.Alexey Bataev2015-04-301-0/+1
| | | | llvm-svn: 236210
* [OPENMP] Codegen for 'private' clause in 'task' directive.Alexey Bataev2015-04-301-0/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tasks codegen for private/firstprivate variables are different rather than for other directives. 1. Build an internal structure of privates for each private variable: struct .kmp_privates_t. { Ty1 var1; ... Tyn varn; }; 2. Add a new field to kmp_task_t type with list of privates. struct kmp_task_t { void * shareds; kmp_routine_entry_t routine; kmp_int32 part_id; kmp_routine_entry_t destructors; .kmp_privates_t. privates; }; 3. Create a function with destructors calls for all privates after end of task region. kmp_int32 .omp_task_destructor.(kmp_int32 gtid, kmp_task_t *tt) { ~Destructor(&tt->privates.var1); ... ~Destructor(&tt->privates.varn); return 0; } 4. Perform default initialization of all private fields (no initialization for POD data, default constructor calls for classes) + provide address of a destructor function after kmpc_omp_task_alloc() and before kmpc_omp_task() calls. kmp_task_t *new_task = __kmpc_omp_task_alloc(ident_t *, kmp_int32 gtid, kmp_int32 flags, size_t sizeof_kmp_task_t, size_t sizeof_shareds, kmp_routine_entry_t *task_entry); DefaultConstructor(new_task->privates.var1); new_task->shareds.var1_ref = &new_task->privates.var1; ... DefaultConstructor(new_task->privates.varn); new_task->shareds.varn_ref = &new_task->privates.varn; new_task->destructors = .omp_task_destructor.; kmp_int32 __kmpc_omp_task(ident_t *, kmp_int32 gtid, kmp_task_t *new_task) Differential Revision: http://reviews.llvm.org/D9322 llvm-svn: 236207
* [OPENMP] Allow to use global variables as lcv in loop-based directives.Alexey Bataev2015-04-306-11/+41
| | | | | | | For proper codegen we need to capture variable in the OpenMP region. In loop-based directives loop control variables are private by default and they must be captured in this region. There was a problem with capturing of globals, used as lcv, as they was not marked as private by default. Differential Revision: http://reviews.llvm.org/D9336 llvm-svn: 236201
* [OPENMP] Fixed codegen for 'copyprivate' clause.Alexey Bataev2015-04-301-2/+2
| | | | | | Fixed initialization of 'single' region completion + changed type of the third argument of __kmpc_copyprivate() runtime function to size_t. llvm-svn: 236198
* Remove XFAIL now that this test passes (fixed by r236184).Richard Smith2015-04-301-1/+0
| | | | llvm-svn: 236194
* Update clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp to pass for ↵NAKAMURA Takumi2015-04-291-3/+3
| | | | | | | | targeting i686. r236155 missed the suffix in "@llvm.memcpy.p0i8.p0i8.i32". llvm-svn: 236184
* Propagate a terrible hack to the sparc target feature handling codeEric Christopher2015-04-291-0/+4
| | | | | | | | | by erasing the soft-float target feature if the rest of the front end added it because of defaults or the soft float option. Add some testing for some of the targets that implement this hack. llvm-svn: 236179
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-292-1/+2
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* XFAIL Hexagon until more codegen in place.Rick Foos2015-04-292-0/+2
| | | | | | | | | | | | | | | | | | Summary: Hexagon is being updated, but there is not enough to pass these tests. These sections are now on top of Colin's list. Test Plan: Ran changes on hexagon-build-03. Reviewers: colinl, rfoos Reviewed By: rfoos Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9356 llvm-svn: 236173
* Revert r236128, LLVM isn't falling back in the right wayReid Kleckner2015-04-292-92/+60
| | | | llvm-svn: 236167
* Stop assuming a 64-bit target here.Richard Smith2015-04-291-3/+3
| | | | llvm-svn: 236155
* PR23373: A defaulted union copy constructor that is not trivial must still beRichard Smith2015-04-291-1/+21
| | | | | | emitted as a memcpy. llvm-svn: 236142
* Revert r236063 due to regression with -fdelayed-template-parsing.Richard Smith2015-04-291-13/+0
| | | | llvm-svn: 236134
* Re-land r236052, the linker errors were fixed by LLVM r236123Reid Kleckner2015-04-292-60/+92
| | | | | | | Basic __finally blocks don't cause linker errors anymore (although they are miscompiled). llvm-svn: 236128
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-291-0/+18
| | | | | | | | | | | | | | | | and as artificial local variables in the debug info. This is a follow-up to r236059. We can't get rid of the local variables entirely because the gdb buildbot depends on them, but we can mark them as artificial while still emitting the correct debug info. As I learned from review comments other compilers also follow this model. A paired commit in LLVM temporarily relaxes the debug info verifier to not check the integrity of DW_OP_bit_pieces of artificial variables. rdar://problem/20730771 llvm-svn: 236125
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-29140-653/+653
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. llvm-svn: 236121
* Revert "Debug Info: Represent local anonymous unions as anonymous unions"Adrian Prantl2015-04-291-18/+0
| | | | | | This reverts commit r236059 as it breaks the gdb buildbot. llvm-svn: 236110
* [OPENMP] Fix crash on reductions codegen for short circuit reduction operations.Alexey Bataev2015-04-291-0/+6
| | | | llvm-svn: 236084
* Revert r236052, it caused linker errors when building 32-bit applications.Nico Weber2015-04-292-92/+60
| | | | llvm-svn: 236082
* Add -Wpessimizing-move and -Wredundant-move warnings.Richard Trieu2015-04-292-0/+271
| | | | | | | | | | | | | | | -Wpessimizing-move warns when a call to std::move would prevent copy elision if the argument was not wrapped in a call. This happens when moving a local variable in a return statement when the variable is the same type as the return type or using a move to create a new object from a temporary object. -Wredundant-move warns when an implicit move would already be made, so the std::move call is not needed, such as when moving a local variable in a return that is different from the return type. Differential Revision: http://reviews.llvm.org/D7633 llvm-svn: 236075
* PR20625: Instantiate static constexpr member function of a local struct in a ↵Richard Smith2015-04-291-0/+13
| | | | | | | | | | | | function template earlier. This is necessary in order to allow the use of a constexpr member function, or a member function with deduced return type, of a local class within a surrounding instantiated function template specialization. Patch by Michael Park! llvm-svn: 236063
* Debug Info: Represent local anonymous unions as anonymous unionsAdrian Prantl2015-04-281-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the debug info. This patch deletes a hack that emits the members of local anonymous unions as local variables. Besides being morally wrong, the existing representation using local variables breaks internal assumptions about the local variables' storage size. Compiling ``` void fn1() { union { int i; char c; }; i = c; } ``` with -g -O3 -verify will cause the verifier to fail after SROA splits the 32-bit storage for the "local variable" c into two pieces because the second piece is clearly outside the 8-bit range that is expected for a variable of type char. Given the choice I'd rather fix the debug representation than weaken the verifier. Debuggers generally already know how to deal with anonymous unions when they are members of C++ record types, but they may have problems finding the local anonymous struct members in the expression evaluator. rdar://problem/20730771 llvm-svn: 236059
* Fix Sema tests using __try by adding tripleReid Kleckner2015-04-283-5/+5
| | | | llvm-svn: 236057
* [SEH] Add 32-bit lowering code for __tryReid Kleckner2015-04-282-60/+92
| | | | | | | | | | | | | | | | | | | | This is just the clang-side of 32-bit SEH. LLVM still needs work, and it will determinstically fail to compile until it's feature complete. On x86, all outlined handlers have no parameters, but they do implicitly take the EBP value passed in and use it to address locals of the parent frame. We model this with llvm.frameaddress(1). This works (mostly), but __finally block inlining can break it. For now, we apply the 'noinline' attribute. If we really want to inline __finally blocks on 32-bit x86, we should teach the inliner how to untangle frameescape and framerecover. Promote the error diagnostic from codegen to sema. It now rejects SEH on non-Windows platforms. LLVM doesn't implement SEH on non-x86 Windows platforms, but there's nothing preventing it. llvm-svn: 236052
* Fix -fno-gnu-inline-asm doesn't catch file scope asmSteven Wu2015-04-281-0/+1
| | | | | | | | | | | | | | | | | | Summary: FileScopeAsm should be treated the same as funcion level inline asm. -fno-gnu-inline-asm should trigger an error if file scope asm is used. I missed this case from r226340. This should not affect ms-extension because it is not allowed in the file scope. Reviewers: bob.wilson, rnk Reviewed By: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9328 llvm-svn: 236044
* Fix assertion failure if a lambda array-capture is followed by a this capture.Richard Smith2015-04-281-0/+9
| | | | llvm-svn: 236043
* [cuda] Preserve TLS storage class of host variable even if it's aArtem Belevich2015-04-281-0/+14
| | | | | | device-side compilation. llvm-svn: 236029
* Implemented ASTImporter support for Stmts and fixedSean Callanan2015-04-284-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some bugs in the ASTImporter that this exposed: - When importing functions, the body (if any) was previously ignored. This patch ensures that the body is imported also. - When a function-local Decl is imported, the first thing the ASTImporter does is import its context (via ImportDeclParts()). This can trigger importing the Decl again as part of the body of the function (but only once, since the function's Decl has been added to ImportedDecls). This patch fixes that problem by extending ImportDeclParts() to return the imported Decl if it was imported as part of importing its context, and the patch adds ASTImporter::GetAlreadyImportedOrNull() to support this query. All callers of ImportDeclParts return the imported version of the Decl if ImportDeclParts() returns it. - When creating functions, InnerLocStart of the source function was re-used without importing. This is a straight up bug, and this patch makes ASTImporter import the InnerLocStart and use the imported version. - When importing FileIDs, the ASTImporter previously always tried to re-load the file for the corresponding CacheEntry from disk. This doesn't work if the CacheEntry corresponds to a named memory buffer. This patch changes the code so that if the UniqueID for the cache entry is invalid (i.e., it is not a disk file) the whole entry is treated as if it were invalid, which forces an in-memory copy of the buffer. Also added test cases, using the new support committed in 236011. llvm-svn: 236012
* Fix PR22047: ObjC: Method unavailability attribute doesn't work with ↵Jonathan Roelofs2015-04-281-0/+19
| | | | | | | | overloaded methods http://reviews.llvm.org/D9261 llvm-svn: 236006
* Combine instantiation context of field initializer with context of class.Serge Pavlov2015-04-281-0/+19
| | | | | | | | | | | | | | Inclass initializer is instantiated in its own LocalInstantiationScope. It causes problems when instantiating local classes - when instantiation scope is searched for DeclContext of the field, the search fails. As a solution, the instantiation scope of field initializer is combined with its outer scope. This patch fixes PR23194. Differential Revision: http://reviews.llvm.org/D9258 llvm-svn: 236005
* AVX-512: added intrinsics for KNL and SKXElena Demikhovsky2015-04-284-0/+791
| | | | | | by Asaf Badouh (asaf.badouh@intel.com) llvm-svn: 235986
* [OPENMP] Fix crash on loop control vars explicitly marked as private.Alexey Bataev2015-04-281-0/+6
| | | | | | It is allowed to mark loop control vars as private in 'private' or 'lastprivate' clause, so no need to assert here. llvm-svn: 235985
* [ARM/AArch64] Enforce alignment for bitfielded structsBradley Smith2015-04-281-0/+15
| | | | | | | | | When creating a global variable with a type of a struct with bitfields, we must forcibly set the alignment of the global from the RecordDecl. We must do this so that the proper bitfield alignment makes its way down to LLVM, since clang will mangle the bitfields into one large type. llvm-svn: 235976
* InstrProf: Match a bit less strictly - some targets may add signextJustin Bogner2015-04-281-2/+2
| | | | | | | | Notably, this bot didn't like it: http://lab.llvm.org:8011/builders/clang-cmake-mips/builds/5117 llvm-svn: 235968
* InstrProf: Mark code regions after throw expressions as unreachableJustin Bogner2015-04-283-8/+38
| | | | | | | We weren't setting regions as being unreachable after C++ throw expressions, leading to incorrect count propagations. llvm-svn: 235967
* DebugInfo: Add a clang test for LLVM fix for PR23332Duncan P. N. Exon Smith2015-04-281-0/+25
| | | | | | | Add a clang test for LLVM r235955, which added support for up to 2^16 arguments. llvm-svn: 235956
* Allow UBSan+MSan and UBSan+TSan combinations (Clang part).Alexey Samsonov2015-04-282-3/+16
| | | | | | | | Embed UBSan runtime into TSan and MSan runtimes in the same as we do in ASan. Extend UBSan test suite to also run tests for these combinations. llvm-svn: 235953
* ms_struct does not imply the MS base-layout ABI; separate theseJohn McCall2015-04-281-0/+33
| | | | | | | | conditions in the IRGen struct layout code. rdar://20636558 llvm-svn: 235949
* Remove stale FIXMEs from test caseReid Kleckner2015-04-271-7/+5
| | | | llvm-svn: 235937
* Always add the target-cpu and target-features sets if they're non-null.Eric Christopher2015-04-271-6/+6
| | | | | | | | This makes sure that the front end is specific about what they're expecting the backend to produce. Update a FIXME with the idea that the target-features could be more precise using backend knowledge. llvm-svn: 235936
* Check whether the operand to a noexcept expression is valid or not. Fixes ↵Aaron Ballman2015-04-271-0/+19
| | | | | | PR15842. llvm-svn: 235931
* Introduce tsan_cxx and msan_cxx libraries (Clang part).Alexey Samsonov2015-04-273-2/+4
| | | | | | | | For now tsan_cxx and msan_cxx contain only operator new/delete replacements. In the future, when we add support for running UBSan+TSan and UBSan+MSan, they will also contain bits ubsan_cxx runtime. llvm-svn: 235924
* PR23334: Perform semantic checking of lambda capture initialization in the ↵Richard Smith2015-04-275-8/+29
| | | | | | | | | | | | | | | | | | right context. Previously we'd try to perform checks on the captures from the middle of parsing the lambda's body, at the point where we detected that a variable needed to be captured. This was wrong in a number of subtle ways. In PR23334, we couldn't correctly handle the list of potential odr-uses resulting from the capture, and our attempt to recover from that resulted in a use-after-free. We now defer building the initialization expression until we leave the lambda body and return to the enclosing context, where the initialization does the right thing. This patch only covers lambda-expressions, but we should apply the same change to blocks and captured statements too. llvm-svn: 235921
* Revert "PR21000: pass -I options to assembler" as the test was failing on ↵Artem Belevich2015-04-271-12/+0
| | | | | | hexagon. llvm-svn: 235919
* PR21000: pass -I options to assemblerArtem Belevich2015-04-271-0/+12
| | | | | | | | | Pass -I options to assembly so it can find files included with .include. Differential Revision: http://reviews.llvm.org/D7472 llvm-svn: 235915
* Simplify depfile quoting test.Paul Robinson2015-04-271-15/+8
| | | | | | | With -MG we don't actually need to create the files with funky names. Also use a more sensible check-prefix for the NMAKE case. llvm-svn: 235908
OpenPOWER on IntegriCloud