summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP 4.1] Add codegen for 'simdlen' clause.Alexey Bataev2015-08-211-0/+64
| | | | | | | | | Add emission of metadata for simd loops in presence of 'simdlen' clause. If 'simdlen' clause is provided without 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are marked with '!llvm.mem.parallel_loop_access' metadata. If 'simdlen' clause is provided along with 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata. If 'safelen' clause is provided without 'simdlen' clause, the vectorizer width for the loop is set to value of 'safelen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata. llvm-svn: 245697
* [OPENMP 4.1] Add ast-print tests for 'val', 'uval' and 'ref' modifiers.Alexey Bataev2015-08-211-6/+10
| | | | llvm-svn: 245693
* [OPENMP 4.1] Initial support for 'simdlen' clause.Alexey Bataev2015-08-219-24/+552
| | | | | | Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter. llvm-svn: 245692
* Expand mingw-long-double.c to test for long double alignment.Yaron Keren2015-08-211-1/+7
| | | | llvm-svn: 245679
* [Sema] Don't crash when diagnosing hack in libstdc++David Majnemer2015-08-211-2/+3
| | | | | | | | | | | | While working around a bug in certain standard library implementations, we would try to diagnose the issue so that library implementors would fix their code. However, we assumed an entity being initialized was a non-static data member subobject when other circumstances are possible. This fixes PR24526. llvm-svn: 245675
* [OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.Alexey Bataev2015-08-211-0/+129
| | | | | | According to standard the 'uval' modifier declares the address of the original list item to have an invariant value for all iterations of the associated loop(s). Patch improves codegen for this qualifier by removing usage of the original reference variable and replacing by referenced l-value. llvm-svn: 245674
* Stop treating -static as overriding -fPIC: they are distinct.James Y Knight2015-08-211-2/+10
| | | | | | | | | | | | | | | | | For some reason, clang had been treating a command like: clang -static -fPIC foo.c as if it should be compiled without the PIC relocation model. This was incorrect: -static should be affecting only the linking model, and -fPIC only the compilation. This new behavior also matches GCC. This is a follow-up from a review comment on r245447. Differential Revision: http://reviews.llvm.org/D12208 llvm-svn: 245667
* [Static Analyzer] Add checker to catch lightweight generics related type ↵Gabor Horvath2015-08-211-0/+5265
| | | | | | | | errors in Objective-C. Differential Revision: http://reviews.llvm.org/D11427 llvm-svn: 245646
* Revert r245344.Evgeniy Stepanov2015-08-201-7/+0
| | | | | | | | That change is causing strange test failures on Fedora 22 (PR24503), and it does not have any effect with Gold linker anyway (PR15823, https://sourceware.org/bugzilla/show_bug.cgi?id=18859). llvm-svn: 245619
* Do not crash when static analysis encounters a FunctionDecl that has a ↵Aaron Ballman2015-08-201-0/+11
| | | | | | delayed template parse of its body. llvm-svn: 245616
* PR24483: Delete some dead/incorrect code that triggered assertions.Richard Smith2015-08-201-0/+6
| | | | llvm-svn: 245609
* Fix test on Windows to accept both gcc and gcc.exe.Yaron Keren2015-08-201-1/+1
| | | | llvm-svn: 245607
* [Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.Ahmed Bougacha2015-08-201-11/+33
| | | | | | | | | | This lets us optimize them better. We agreed to remove the intrinsics, instead of combining them later, as, at -O0, we generate the expected instructions. Plus, it's a nice cleanup. Differential Revision: http://reviews.llvm.org/D10556 llvm-svn: 245605
* [Sparc] Add '-EL' when invoking gcc to link little-endian binaries.Douglas Katzman2015-08-201-0/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D12201 llvm-svn: 245595
* Revert r245496 "[CUDA] Add appropriate host/device attribute to builtins."Artem Belevich2015-08-202-38/+3
| | | | | | It's breaking internal test. llvm-svn: 245592
* Fix crash with two typos in the arguments of a functionOlivier Goffart2015-08-201-0/+6
| | | | | | | | The problem is that the arguments are of TheCall are reset later to the ones in Args, making TypoExpr put back. Some TypoExpr that have already been diagnosed and will assert later in Sema::getTypoExprState llvm-svn: 245560
* [OPENMP 4.1] Allow to use 'uval' and 'ref' modifiers for reference types only.Alexey Bataev2015-08-201-6/+8
| | | | | | Standard allows to use 'uval' and 'ref' modifiers in 'linear' clause for variables with reference types only. Added check for it and modified test. llvm-svn: 245556
* [OPENMP 4.1] Initial support for modifiers in 'linear' clause.Alexey Bataev2015-08-202-8/+52
| | | | | | | | | | | | | | | | | | | | | | OpenMP 4.1 adds 3 optional modifiers to 'linear' clause. Format of 'linear' clause has changed to: ``` linear(linear-list[ : linear-step]) ``` where linear-list is one of the following ``` list modifier(list) ``` where modifier is one of the following: ``` ref (C++) val (C/C++) uval (C++) ``` Patch adds parsing and sema analysis for these modifiers. llvm-svn: 245550
* Fix the layout of bitfields in ms_struct unions: theirJohn McCall2015-08-1912-242/+272
| | | | | | | | | | | | | | | alignment is ignored, and they always allocate a complete storage unit. Also, change the dumping of AST record layouts: use the more readable C++-style dumping even in C, include bitfield offset information in the dump, and don't print sizeof/alignof information for fields of record type, since we don't do so for bases or other kinds of field. rdar://22275433 llvm-svn: 245514
* Fix -Wlogical-not-parentheses to work better with C code.Richard Trieu2015-08-193-2/+206
| | | | | | | Remove the assumption of a Boolean type by checking if an expression is known to have a boolean value. Disable warning in two other tests. llvm-svn: 245507
* Internal-linkage variables with constant-evaluatable initializers do not ↵Richard Smith2015-08-196-7/+26
| | | | | | need to be emitted. (Also reduces the set of variables that need to be eagerly deserialized when using PCH / modules.) llvm-svn: 245497
* [CUDA] Add appropriate host/device attribute to builtins.Artem Belevich2015-08-192-3/+38
| | | | | | Differential Revision: http://reviews.llvm.org/D12122 llvm-svn: 245496
* Generating available_externally vtables bugfixPiotr Padlewski2015-08-191-0/+77
| | | | | | | | Bugfix revealed in r245264. http://reviews.llvm.org/D12128 llvm-svn: 245489
* Add REQUIRES: x86-registered-target to test since it's required.Yaron Keren2015-08-191-0/+1
| | | | llvm-svn: 245462
* According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.Yaron Keren2015-08-191-0/+5
| | | | | | | See https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html llvm-svn: 245459
* Properly pass through the PIC mode to the integrated assembler whenJames Y Knight2015-08-191-3/+3
| | | | | | | | | | | | | | | | | | doing assembly-only, and unify the Driver's PIC argument parsing. On a few architectures, parsing of assembly files annoyingly depends on whether PIC is enabled or not. This was handled for external 'as' already (passing -KPIC), but was missed for calls to the standalone internal assembler. The integrated-as.s test needed to be modified to not expect -fsanitize=address to be unused, as now fsanitize *IS* used for assembly, since -fsanitize=memory can sometimes imply -fPIE, which the assembler needs to know (gack!!). Differential Revision: http://reviews.llvm.org/D11845 llvm-svn: 245447
* [ARM] Proper generic cpus handlingVladimir Sukharev2015-08-191-0/+19
| | | | | | | | | | | | | | "generic" cpu was wrongly handled as exact real CPU name of ARMv8.1A architecture. This has been fixed, now it is abstract name, suitable for any arch. Reviewers: rengolin Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11640 llvm-svn: 245445
* [OPENMP] Link libomp.lib on WindowsAlexey Bataev2015-08-191-0/+18
| | | | | | | Adds libomp.lib for -fopenmp=libomp and libiomp5md.lib for -fopenmp=libiomp5 on Windows Differential Revision: http://reviews.llvm.org/D11932 llvm-svn: 245414
* Make __builtin_object_size always answer correctlyGeorge Burgess IV2015-08-192-4/+134
| | | | | | | | | | | | | | | | | | __builtin_object_size would return incorrect answers for many uses where type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's objectsize intrinsic. Additionally, there are many cases where we would emit suboptimal (but correct) answers, such as when arrays are involved. This patch fixes some of these cases (please see new tests in test/CodeGen/object-size.c for specifics on which cases are improved) Resubmit of r245323 with PR24493 fixed. Patch mostly by Richard Smith. Differential Revision: http://reviews.llvm.org/D12000 This fixes PR15212. llvm-svn: 245403
* [modules] Tests for r245390.Richard Smith2015-08-185-0/+21
| | | | llvm-svn: 245391
* Initialize the AST consumer as soon as we have both an ASTConsumer and anRichard Smith2015-08-182-2/+5
| | | | | | | ASTContext. Fixes some cases where we could previously initialize the AST consumer more than once. llvm-svn: 245346
* [sanitizer] Add -lutil to static runtime link flags.Evgeniy Stepanov2015-08-181-0/+7
| | | | | | | This is needed to prevent breakage of -Wl,-as-needed link when interceptors for functions in libutil are added. See PR15823. llvm-svn: 245344
* Revert r245323, it caused PR24493.Nico Weber2015-08-182-93/+4
| | | | llvm-svn: 245342
* Make __builtin_object_size always answer correctlyGeorge Burgess IV2015-08-182-4/+93
| | | | | | | | | | | | | | | | | __builtin_object_size would return incorrect answers for many uses where type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's objectsize intrinsic. Additionally, there are many cases where we would emit suboptimal (but correct) answers, such as when arrays are involved. This patch fixes some of these cases (please see new tests in test/CodeGen/object-size.c for specifics on which cases are improved) Patch mostly by Richard Smith. Differential Revision: http://reviews.llvm.org/D12000 This fixes PR15212. llvm-svn: 245323
* [OPENMP 4.1] Allow variables with reference types in private clauses.Alexey Bataev2015-08-1838-143/+135
| | | | | | OpenMP 4.1 allows to use variables with reference types in all private clauses (private, firstprivate, lastprivate, linear etc.). Patch allows to use such variables and fixes codegen for linear variables with reference types. llvm-svn: 245268
* Revert "Generating assumption loads of vptr after ctor call (fixed)"Justin Bogner2015-08-187-208/+19
| | | | | | | | | | | Bootstrap bots were failing: http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/6382/ http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/2969 This reverts r245264. llvm-svn: 245267
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-08-187-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: 245264
* Revert r245257 "Generating assumption loads of vptr after ctor call"Hans Wennborg2015-08-187-209/+19
| | | | | | It caused PR24479 llvm-svn: 245260
* Generating assumption loads of vptr after ctor callPiotr Padlewski2015-08-177-19/+209
| | | | | | | | | | | | 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 http://reviews.llvm.org/D11859 llvm-svn: 245257
* Make a test less brittle.Richard Trieu2015-08-171-44/+56
| | | | | | Capture line numbers in a variable for FileCheck instead of hardcoding them. llvm-svn: 245250
* [modules] When parsing the base specifiers of a parse-merged class, the currentRichard Smith2015-08-174-14/+27
| | | | | | | | context is the class itself but lookups should be performed starting with the lookup parent of the class (class and base members don't shadow types from the surrounding context because they have not been declared yet). llvm-svn: 245236
* [modules] PR20507: Avoid silent textual inclusion.Sean Silva2015-08-1711-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If a module was unavailable (either a missing requirement on the module being imported, or a missing file anywhere in the top-level module (and not dominated by an unsatisfied `requires`)), we would silently treat inclusions as textual. This would cause all manner of crazy and confusing errors (and would also silently "work" sometimes, making the problem difficult to track down). I'm really not a fan of the `M->isAvailable(getLangOpts(), getTargetInfo(), Requirement, MissingHeader)` function; it seems to do too many things at once, but for now I've done things in a sort of awkward way. The changes to test/Modules/Inputs/declare-use/module.map were necessitated because the thing that was meant to be tested there (introduced in r197805) was predicated on silently falling back to textual inclusion, which we no longer do. The changes to test/Modules/Inputs/macro-reexport/module.modulemap are just an overlooked missing header that seems to have been missing since this code was committed (r213922), which is now caught. Reviewers: rsmith, benlangmuir, djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10423 llvm-svn: 245228
* [modules] When explicitly building a module file, don't include timestamps inRichard Smith2015-08-172-1/+5
| | | | | | | the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
* Enable passing test on Windows + MSYS.Yaron Keren2015-08-161-1/+0
| | | | llvm-svn: 245184
* [Sema] Be consistent about diagnostic wording: always use "cannot".Davide Italiano2015-08-1512-98/+98
| | | | | | Discussed with Richard Smith. llvm-svn: 245162
* Delay emitting members of dllexport classes until the class is fully parsed ↵Hans Wennborg2015-08-151-1/+49
| | | | | | | | | | | | | | | | | (PR23542) This enables Clang to correctly handle code such as: struct __declspec(dllexport) S { int x = 42; }; where it would otherwise error due to trying to generate the default constructor before the in-class initializer for x has been parsed. Differential Revision: http://reviews.llvm.org/D11850 llvm-svn: 245139
* [modules] Stop dropping 'module.timestamp' files into the current directoryRichard Smith2015-08-151-0/+14
| | | | | | when building with implicit modules disabled. llvm-svn: 245136
* clarified test commentNaomi Musgrave2015-08-141-1/+2
| | | | llvm-svn: 245124
* [CONCEPTS] Add diagnostic; invalid tag when concept specifiedNathan Wilson2015-08-141-0/+10
| | | | | | | | | | | | Summary: Adding check to emit diagnostic for invalid tag when concept is specified and associated tests. Reviewers: rsmith, hubert.reinterpretcast, fraggamuffin, faisalv, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D11916 llvm-svn: 245123
* [analyzer] Add checkers for OS X / iOS localizability issuesAnna Zaks2015-08-142-0/+329
| | | | | | | | | | | | | | | Add checkers that detect code-level localizability issues for OS X / iOS: - A path sensitive checker that warns about uses of non-localized NSStrings passed to UI methods expecting localized strings. - A syntax checker that warns against not including a comment in NSLocalizedString macros. A patch by Kulpreet Chilana! (This is the second attempt with the compilation issue on Windows and the random test failures resolved.) llvm-svn: 245093
OpenPOWER on IntegriCloud