summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Support merging a parsed default argument with an imported hidden ↵Richard Smith2015-05-201-1/+2
| | | | | | one for non-type and template template parameters too. llvm-svn: 237815
* [modules] Support merging a parsed default function/template argument with ↵Richard Smith2015-05-201-0/+2
| | | | | | an imported but hidden one. llvm-svn: 237814
* InstrProf: Change this triple back to %itanium_abi_tripleJustin Bogner2015-05-201-1/+1
| | | | | | | In my rush to fix the linux bots in r237805, I accidentally committed a change to the triple. Revert that part. llvm-svn: 237806
* InstrProf: Remove darwin-specific section names from this testJustin Bogner2015-05-201-5/+5
| | | | llvm-svn: 237805
* InstrProf: Increment the profile counter for all types of destructorJustin Bogner2015-05-201-0/+30
| | | | | | | | | | | | -fprofile-instr-generate does not emit counter increment intrinsics for Dtor_Deleting and Dtor_Complete destructors with assigned counters. This causes unnecessary [-Wprofile-instr-out-of-date] warnings during profile-use runs even if the source has never been modified since profile collection. Patch by Betul Buyukkurt. Thanks! llvm-svn: 237804
* [OPENMP] Fix codegen for ordered loop directives.Alexey Bataev2015-05-201-13/+15
| | | | | | loops with ordered clause must be generated the same way as dynamic loops, but with static scheduleing. llvm-svn: 237788
* [MSVC] Handle out-of-line definition of static data member correctly (fix ↵Alexey Bataev2015-05-202-29/+52
| | | | | | | | | | | | | | | | | | for http://llvm.org/PR21164), by Alexey Frolov There are 3 cases of defining static const member: initialized inside the class, not defined outside the class. initialized inside the class, defined outside the class. not initialized inside the class, defined outside the class. Revision r213304 was supposed to fix the linkage problem of case (1), but mistakenly it made case (2) behave the same. As a result, out-of-line definition of static data member is not handled correctly. Proposed patch distinguishes between cases (1) and (2) and allows to properly emit static const members under –fms-compatibility option. This fixes http://llvm.org/PR21164. Differential Revision: http://reviews.llvm.org/D9850 llvm-svn: 237787
* [X86] Add _mm256_set_m128 and its 5 variants.Michael Kuperstein2015-05-201-0/+35
| | | | | | Differential Revision: http://reviews.llvm.org/D9855 llvm-svn: 237778
* [clang-cl] Map /GA to -ftls-model=local-execDavid Majnemer2015-05-201-0/+3
| | | | | | | The /GA switch informs the compiler that it may assume that all TLS access refers to the executable's index: 0. llvm-svn: 237771
* [OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev2015-05-20182-383/+365
| | | | | | | -fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 llvm-svn: 237769
* Fix for aggregate copying of variable length arrays.Alexey Bataev2015-05-201-2/+11
| | | | | | | | | | | | | Patch fixes codegen for aggregate copying of VLAs. Currently method CodeGenFunction::EmitAggregateCopy() does not support copying of VLAs. Patch checks if the size of the type is 0, then checks if the type is actually a variable-length array. Then it calculates total length for this array and calculates total size of the array in bytes: <total number of elements in array> * aligned_sizeof(ElementType) (if copy assignment is requested). If simple copying is requested, size is calculated like: <total number of elements in array> * aligned_sizeof(ElementType) - aligned_sizeof(ElementType) + sizeof(ElementType). memcpy() is used with this calculated size of the VLA. Differential Revision: http://reviews.llvm.org/D9851 llvm-svn: 237768
* Revert r237609 for now.Richard Smith2015-05-191-3/+3
| | | | | | | | | | | | glibc's headers use __need_* macros to selectively export parts of themselves to each other. This requires us to enter those files repeatedly when building a glibc module. This can be unreverted once we have a better mechanism to deal with that non-modular aspect of glibc (possibly some way to mark a header as "textual if this macro is defined"). llvm-svn: 237718
* [X86] Add _mm_broadcastsd_pd intrinsicMichael Kuperstein2015-05-191-0/+5
| | | | | | _mm_broadcastsd_pd is basically an alias for _mm_movedup_pd, however the alias is only available from AVX2 forward. llvm-svn: 237698
* [X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.Michael Kuperstein2015-05-191-0/+10
| | | | | | These two intrinsics are alternative names for _mm256_slli_si256 and _mm256_srli_si256, respectively. llvm-svn: 237693
* [OPENMP] Fixed codegen for copying/initialization of array variables/parameters.Alexey Bataev2015-05-195-0/+112
| | | | | | This modification generates proper copyin/initialization sequences for array variables/parameters. Before they were considered as pointers, not arrays. llvm-svn: 237691
* [OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.Alexey Bataev2015-05-193-1/+11
| | | | | | Currently runtime does not allow to support variably modified types for 'private' and 'firstprivate' clauses in 'task' directives. llvm-svn: 237674
* [OPENMP] Prohibit variably modified types in 'copyprivate' clause.Alexey Bataev2015-05-191-2/+2
| | | | | | Runtime does not allow to work with VLAs in copyprivate clause. llvm-svn: 237672
* [OPENMP] Fixed analysis of function arguments and their data sharing attributes.Alexey Bataev2015-05-194-4/+30
| | | | | | Added proper analysis for types of function arguments. llvm-svn: 237670
* PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.Richard Smith2015-05-192-6/+6
| | | | llvm-svn: 237652
* [modules] Support for merging a parsed definition of a static data member of ↵Richard Smith2015-05-191-0/+2
| | | | | | a class template into an imported but hidden definition. llvm-svn: 237647
* Revert changes to DefaultABIInfo accidentally introduced in r208733Reid Kleckner2015-05-181-0/+12
| | | | | | | | | | | | Also add trivial handling of transparent unions. PPC32, MSP430, and XCore apparently all rely on DefaultABIInfo. This should worry you, because DefaultABIInfo is not implementing the rules of any particular ABI. Fixes PR23097, patch by Andy Gibbs. llvm-svn: 237630
* [modules] Support for merging a parsed class template specialization ↵Richard Smith2015-05-181-0/+5
| | | | | | definition into an imported but hidden definition. llvm-svn: 237612
* [modules] When a file is listed as a non-textual header in a module map, don'tRichard Smith2015-05-181-3/+3
| | | | | | | | | | enter it more than once, even if it doesn't have #include guards -- we already know that it is intended to have the same effect every time it's included, and it's already had that effect. This particularly helps with local submodule visibility builds, where the include guard macro may not be visible in the includer, but will become visible the moment we enter the included file. llvm-svn: 237609
* Detect uses of mismatching forms of 'new' and 'delete'Ismail Pazarbasi2015-05-186-30/+318
| | | | | | | | | | | | | | | | | Emit warning when operand to `delete` is allocated with `new[]` or operand to `delete[]` is allocated with `new`. rev 2 update: `getNewExprFromInitListOrExpr` should return `dyn_cast_or_null` instead of `dyn_cast`, since `E` might be null. Reviewers: rtrieu, jordan_rose, rsmith Subscribers: majnemer, cfe-commits Differential Revision: http://reviews.llvm.org/D4661 llvm-svn: 237608
* Have -Wredundant-move ignore reference types.Richard Trieu2015-05-181-2/+26
| | | | | | | Don't give a warning when the type being moved is a reference type. Also uncomment two lines in the test case. llvm-svn: 237607
* [OPENMP] Fix for '#pragma omp task' codegen.Alexey Bataev2015-05-182-44/+42
| | | | | | | | | | | | | | | | | | Internal task structure must be generated like typedef struct kmp_task { void * shareds; kmp_routine_entry_t routine; kmp_int32 part_id; kmp_routine_entry_t destructors; } kmp_task_t; struct kmp_task_t_with_privates { kmp_task_t task_data; .kmp_private. privates; }; to avoid possible additional alignment bytes in first fields (shareds, routine, part_id and destructors). Runtime library is not aware of such kind additional alignment bytes. llvm-svn: 237561
* [modules] Move implicit creation of ImportDecls for #includes transformed ↵Richard Smith2015-05-182-4/+4
| | | | | | into module imports from the frontend into Sema where it belongs. llvm-svn: 237555
* [clang-cl] Enable C++14 when targeting 2015 compatibilityDavid Majnemer2015-05-181-0/+6
| | | | llvm-svn: 237553
* [modules] Refactor and simplify #include handling.Richard Smith2015-05-181-4/+0
| | | | | | | Fix a tiny bug where we'd try to load a module file for the module we're in the middle of building. llvm-svn: 237552
* clang/test/CodeGenOpenCL/opencl_types.cl: Tweak expressions according to ↵NAKAMURA Takumi2015-05-181-1/+1
| | | | | | | | | | | r237548. With MS mangler, the signature is: x86: define void @"\01?bad1@@$$J0YAXPAPAUocl_image1d@@PAPAUocl_image2d@@1@Z" (%opencl.image1d_t** %b, %opencl.image2d_t** %c, %opencl.image2d_t** %d) nounwind x64: define void @"\01?bad1@@$$J0YAXPEAPAUocl_image1d@@PEAPAUocl_image2d@@1@Z"(%opencl.image1d_t** %b, %opencl.image2d_t** %c, %opencl.image2d_t** %d) nounwind llvm-svn: 237551
* [modules] If we see a #include that maps to a module, but use of precompiled ↵Richard Smith2015-05-182-1/+2
| | | | | | modules is disabled, track submodule visibility anyway if -fmodules-local-submodule-visibility is enabled. This, in effect, gives modules semantics but without precompilation. llvm-svn: 237550
* [MS ABI] Give __attribute__((overloadable)) functions pretty namesDavid Majnemer2015-05-181-0/+3
| | | | | | | | It turns out that there is a mangling for 'extern "C"', it's only used by MSVC in /clr mode. Co-opt this mangling so that extern "C" functions marked overloadable get demangled nicely. llvm-svn: 237548
* [MS ABI] Function encodings are always encoded in template argumentsDavid Majnemer2015-05-181-0/+6
| | | | llvm-svn: 237547
* Don't leak TemplateIds when a plugin parses late-parsed templates at TU end.Nico Weber2015-05-171-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | In -fdelayed-template-parsing mode, templates that aren't used are not parsed at all. For some diagnostic plugins, this is a problem since they want to analyse the contents of the template function body. What has been suggested on cfe-dev [1] is to explicitly parse interesting templates in HandleTranslationUnit(); IWYU does this for example [2]. This is workable, but since the delayed parsing doesn't run below a call to ParseTopLevelDecl(), no DestroyTemplateIdAnnotationsRAIIObj object is on the stack to clean up TemplateIds that are created during parsing. To fix this, let ~Parser() clean them up in delayed template parsing mode instead of leaking (or asserting in +Assert builds). (r219810, relanded in r220400, fixed the same problem in incremental processing mode; the review thread of r219810 has a good discussion of the problem.) To test this, give the PrintFunctionNames plugin a flag to force parsing of a template and add a test that uses it in -fdelayed-template-parsing mode. Without the Parser.cpp change, that test asserts. 1: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-August/038415.html 2: https://code.google.com/p/include-what-you-use/source/detail?r=566 llvm-svn: 237531
* Fix typo from r237482. "to reference of type" --> "to reference to type"Richard Trieu2015-05-166-13/+13
| | | | llvm-svn: 237507
* When emitting a dropped qualifier error, show which qualifiers are dropped.Richard Trieu2015-05-169-18/+61
| | | | llvm-svn: 237505
* [PPC64] Add vector pack/unpack support from ISA 2.07Bill Schmidt2015-05-162-2/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following new instructions in the Power ISA 2.07: vpksdss vpksdus vpkudus vpkudum vupkhsw vupklsw These instructions are available through the vec_packs, vec_packsu, vec_unpackh, and vec_unpackl built-in interfaces. These are lane-sensitive instructions, so the built-ins have different implementations for big- and little-endian, and the instructions must be marked as killing the vector swap optimization for now. The first three instructions perform saturating pack operations. The fourth performs a modulo pack operation, which means it can be represented with a vector shuffle, and conversely the appropriate vector shuffles may cause this instruction to be generated. The other instructions are only generated via built-in support for now. I noticed during patch preparation that the macro __VSX__ was not previously predefined when the power8-vector or direct-move features are requested. This is an error, and I've corrected that here as well. Appropriate tests have been added. There is a companion patch to llvm for the rest of this support. llvm-svn: 237500
* clang/test/SemaCXX/attr-no-sanitize.cpp: Don't mix stdout and stderr for ↵NAKAMURA Takumi2015-05-161-2/+2
| | | | | | | | FileCheck. MSVCRT's stdio doesn't do line buffering. llvm-svn: 237492
* Reverse the order of types in the reference dropping qualifiers error.Richard Trieu2015-05-156-13/+13
| | | | | | | | The error has the form ... 'int' ... 'const int' ... dropped qualifiers. At first glance, it appears that the const qualifier is added. Reverse the types so that the second type is less qualified than the first. llvm-svn: 237482
* [modules] Add local submodule visibility support for declarations.Richard Smith2015-05-157-2/+28
| | | | | | | | | | | | With this change, enabling -fmodules-local-submodule-visibility results in name visibility rules being applied to submodules of the current module in addition to imported modules (that is, names no longer "leak" between submodules of the same top-level module). This also makes it much safer to textually include a non-modular library into a module: each submodule that textually includes that library will get its own "copy" of that library, and so the library becomes visible no matter which including submodule you import. llvm-svn: 237473
* Implement no_sanitize attribute.Peter Collingbourne2015-05-155-13/+111
| | | | | | Differential Revision: http://reviews.llvm.org/D9631 llvm-svn: 237463
* Limit set of types instantiated in FindInstantiatedDecl.Serge Pavlov2015-05-151-0/+37
| | | | | | | | Starting from r236426 FindInstantiatedDecl may instantiate types that are referenced before definition. This change limit the set of types that can be instantiated by this function. llvm-svn: 237434
* [OPENMP] Fixed bug in atomic update/capture/write constructs.Alexey Bataev2015-05-156-668/+382
| | | | | | Fixed a bug with codegen for destination atomic l-value with padding and junk in this padding bytes. llvm-svn: 237422
* Revert r237385, "[CodeGen] Reuse stack space from unused function results"NAKAMURA Takumi2015-05-151-125/+0
| | | | | | It broke clang stage2, at least tblgen. llvm-svn: 237418
* Add flag to enable native half typePirama Arumuga Nainar2015-05-141-36/+139
| | | | | | | | | | | | | | | | | | | Summary: r235215 enables support in LLVM for legalizing f16 type in the IR. AArch64 already had support for this. r235215 and some backend patches brought support for ARM, X86, X86-64, Mips and Mips64. This change exposes the LangOption 'NativeHalfType' in the command line, so the backend legalization can be used if desired. NativeHalfType is enabled for OpenCL (current behavior) or if '-fnative-half-type' is set. Reviewers: olista01, steven_wu, ab Subscribers: cfe-commits, srhines, aemerson Differential Revision: http://reviews.llvm.org/D9781 llvm-svn: 237406
* InstrProf: Only disable coverage in built-in macros, not all system macrosJustin Bogner2015-05-141-0/+24
| | | | | | | | | The issue I was trying to solve in r236547 was about built-in macros, but I disabled coverage in all system macros. This is actually a bit of overkill, and makes the display of coverage around system macros degrade unnecessarily. Instead, limit this to builtins specifically. llvm-svn: 237397
* Tweak availability checking to look through typedef declarations.Ted Kremenek2015-05-141-0/+16
| | | | llvm-svn: 237396
* Revert "Detect uses of mismatching forms of 'new' and 'delete'"Diego Novillo2015-05-146-317/+30
| | | | | | | | | This reverts commit 742dc9b6c9686ab52860b7da39c3a126d8a97fbc. This is generating multiple segfaults in our internal builds. Test case coming up shortly. llvm-svn: 237391
* Testing for the fix for bug 23429.Nemanja Ivanovic2015-05-141-0/+13
| | | | | | | | | Follow-up to commit for revision 236848. Just a test case for the macro definition under the right CPU/Arch. One combination was actually missed in the initial fix: - powerpc64-unknown-unknown -mcpu=pwr8 (rather than -mcpu=power8). llvm-svn: 237386
* [CodeGen] Reuse stack space from unused function resultsSergey Dmitrouk2015-05-141-0/+125
| | | | | | | | | | | | | | | | | | | | Summary: Space on stack allocated for unused structures returned by functions was unused even when it's lifetime didn't intersect with lifetime of any other objects that could use the same space. The test added also checks for named and auto objects. It seems to make sense to have this all in one place. Reviewers: aadg, rsmith, rjmccall, rnk Reviewed By: rnk Subscribers: asl, cfe-commits Differential Revision: http://reviews.llvm.org/D9743 llvm-svn: 237385
OpenPOWER on IntegriCloud