summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).Devin Coughlin2015-09-221-3/+31
| | | | | | | | | | | | | | | | | | Currently realloc(ptr, 0) is treated as free() which seems to be not correct. C standard (N1570) establishes equivalent behavior for malloc(0) and realloc(ptr, 0): "7.22.3 Memory management functions calloc, malloc, realloc: If the size of the space requested is zero, the behavior is implementation-defined: either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object." The patch equalizes the processing of malloc(0) and realloc(ptr,0). The patch also enables unix.Malloc checker to detect references to zero-allocated memory returned by realloc(ptr,0) ("Use of zero-allocated memory" warning). A patch by Антон Ярцев! Differential Revision: http://reviews.llvm.org/D9040 llvm-svn: 248336
* [analyzer] Create one state for a range switch case instead of multiple.Devin Coughlin2015-09-221-0/+220
| | | | | | | | | | | | | This fixes PR16833, in which the analyzer was using large amounts of memory for switch statements with large case ranges. rdar://problem/14685772 A patch by Aleksei Sidorin! Differential Revision: http://reviews.llvm.org/D5102 llvm-svn: 248318
* Analyzer: Teach analyzer how to handle TypeTraitExprIsmail Pazarbasi2015-09-221-1/+36
| | | | | | | | | | | | | | | | | | | | Summary: `TypeTraitExpr`s are not supported by the ExprEngine today. Analyzer creates a sink, and aborts the block. Therefore, certain bugs that involve type traits intrinsics cannot be detected (see PR24710). This patch creates boolean `SVal`s for `TypeTraitExpr`s, which are evaluated by the compiler. Test within the patch is a summary of PR24710. Reviewers: zaks.anna, dcoughlin, krememek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12482 llvm-svn: 248314
* [CUDA] Allow parsing of host and device code simultaneously.Artem Belevich2015-09-221-19/+14
| | | | | | | | | | | | * adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 llvm-svn: 248299
* [CUDA] Fixes minor cuda-related issues in the driverArtem Belevich2015-09-221-2/+20
| | | | | | | | | | * Only the last of the --cuda-host-only/--cuda-device-only options has effect. * CudaHostAction always wraps host-side compilation now. * Fixed printing of empty action lists. Differential Revision: http://reviews.llvm.org/D12892 llvm-svn: 248297
* [CUDA] Add appropriate host/device attribute to builtins.Artem Belevich2015-09-222-3/+42
| | | | | | | | | The changes are part of attribute-based CUDA function overloading (D12453) and as such are only enabled when it's in effect (-fcuda-target-overloads). Differential Revision: http://reviews.llvm.org/D12122 llvm-svn: 248296
* [CUDA] Allow function overloads in CUDA based on host/device attributes.Artem Belevich2015-09-222-0/+531
| | | | | | | | | | | | | | | | | | | The patch makes it possible to parse CUDA files that contain host/device functions with identical signatures, but different attributes without having to physically split source into host-only and device-only parts. This change is needed in order to parse CUDA header files that have a lot of name clashes with standard include files. Gory details are in design doc here: https://goo.gl/EXnymm Feel free to leave comments there or in this review thread. This feature is controlled with CC1 option -fcuda-target-overloads and is disabled by default. Differential Revision: http://reviews.llvm.org/D12453 llvm-svn: 248295
* [CUDA] Add implicit __attribute__((used)) to all __global__ functions.Artem Belevich2015-09-221-0/+15
| | | | | | | | | | This makes sure that we emit kernels that were instantiated from the host code and which would never be explicitly referenced by anything else on device side. Differential Revision: http://reviews.llvm.org/D11666 llvm-svn: 248293
* [mips] Added support for using the command line options -Wa,-msoft-float and ↵Daniel Sanders2015-09-221-0/+25
| | | | | | | | | | | | | | -Wa,-mhard-float. Patch by Scott Egerton. Reviewers: vkalintiris, dsanders Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12600 llvm-svn: 248276
* Add bug number to FIXME comment.Nico Weber2015-09-221-1/+1
| | | | llvm-svn: 248235
* ms Intrin.h: Fix __movsw's and __stosw's inline asm.Nico Weber2015-09-221-2/+34
| | | | | | | | | | | Before, clang's internal assembler would reject the inline asm in clang's Intrin.h. To make sure this doesn't happen for other Intrin.h functions using __asm__ blocks, add 32-bit and 64-bit codegen tests for Intrin.h. Sadly, these tests discovered that __readcr3 and __writecr3 have bad implementations in 64-bit builds. This will have to be fixed in a follow-up. llvm-svn: 248234
* Remove attributes minsize and optsize, which conflict with optnone.Akira Hatanaka2015-09-211-0/+18
| | | | | | | | | | | This commit fixes an assert that is triggered when optnone is being added to an IR function that is already marked with minsize and optsize. rdar://problem/22723716 Differential Revision: http://reviews.llvm.org/D13004 llvm-svn: 248191
* Add a belated testcase for the skeleton CU behavior in r248062.Adrian Prantl2015-09-211-2/+20
| | | | llvm-svn: 248185
* Debug Info: When building a module, emit skeleton CUs for imported modules.Adrian Prantl2015-09-211-0/+15
| | | | llvm-svn: 248184
* Revert "[ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def"James Molloy2015-09-211-14/+12
| | | | | | | | This was committed without the code review (http://reviews.llvm.org/D12938) being approved. This reverts commit r248154. llvm-svn: 248173
* Fix assertion in inline assembler IR genAlexander Musman2015-09-211-0/+12
| | | | | | | Several inputs may not refer to one output constraint in inline assembler insertions, clang was failing on assertion on such test case. llvm-svn: 248158
* [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.defArtyom Skrobov2015-09-211-12/+14
| | | | | | | | | | | | | | | | Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a hand-rolled tricky condition block in lib/Basic/Targets.cpp, with a FIXME: attached. http://reviews.llvm.org/D12937 moved the handling of +t2dsp over to ARMTargetParser.def in LLVM, to be in line with other architecture extensions. This is the corresponding patch to clang, to clear the FIXME: and update the tests. Differential Revision: http://reviews.llvm.org/D12938 llvm-svn: 248154
* clang/test/Modules/DebugInfoSubmodules.c REQUIRES asserts due to -debug-only.NAKAMURA Takumi2015-09-211-0/+1
| | | | llvm-svn: 248142
* Module debugging: Support submodules in the PCM/PCH debug info.Adrian Prantl2015-09-204-0/+32
| | | | llvm-svn: 248127
* [X86][SSE] Replace 128-bit SSE41 PMOVSX intrinsics with native IRSimon Pilgrim2015-09-192-12/+6
| | | | | | | | | | 128-bit vector integer sign extensions correctly lower to the pmovsx instructions even for debug builds. This patch removes the builtins and reimplements the _mm_cvtepi*_epi* intrinsics __using builtin_shufflevector (to extract the bottom most subvector) and __builtin_convertvector (to actually perform the sign extension). Differential Revision: http://reviews.llvm.org/D12835 llvm-svn: 248092
* [Modules] More descriptive diagnostics for misplaced import directiveSerge Pavlov2015-09-1911-12/+49
| | | | | | | | | | If an import directive was put into wrong context, the error message was obscure, complaining on misbalanced braces. To get more descriptive messages, annotation tokens related to modules are processed where they must not be seen. Differential Revision: http://reviews.llvm.org/D11844 llvm-svn: 248085
* Add test that we correctly allow some non-letter unicode characters inRichard Smith2015-09-191-1/+10
| | | | | | identifiers, and extend existing test to also cover C++. llvm-svn: 248079
* [Static Analyzer] Fixed a false positive case in DynamicTypeChecker when ↵Gabor Horvath2015-09-181-0/+10
| | | | | | dealing with forward declarations. llvm-svn: 248065
* Split off the binary literal warning into a subgroup of C++14 warningsRichard Trieu2015-09-181-0/+5
| | | | | | | | | Binary literals predate C++14, but they are listed as a C++14 extension since this was the first time they were standardized in the language. Move the warning into a subgroup so it can be selectively disabled when checking for other C++14 features. llvm-svn: 248064
* Relax the test to get it passing with windows paths.Rafael Espindola2015-09-181-1/+1
| | | | llvm-svn: 248051
* Analyzer: Fix a crasher in UbigraphVizIsmail Pazarbasi2015-09-181-0/+7
| | | | | | | | | | | | | | | Summary: Name `Out` refers to the parameter. It is moved into the member `Out` in ctor-init. Dereferencing null pointer will crash clang, if user passes '-analyzer-viz-egraph-ubigraph' argument. Reviewers: zaks.anna, krememek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12119 llvm-svn: 248050
* [Static Analyzer] General type checker based on dynamic type information.Gabor Horvath2015-09-182-219/+429
| | | | | | Differential Revision: http://reviews.llvm.org/D12973 llvm-svn: 248041
* Handle lld not being found in PATH.Rafael Espindola2015-09-181-1/+1
| | | | llvm-svn: 248035
* clang-cl: Don't warn on /bigobj flagNico Weber2015-09-181-0/+1
| | | | | | | | | | LLVM r217812 made it so that clang-cl implicitly creates bigobj files when needed, independent of this flag. It looks like cl has this flag to produce obj flags compatible with MSVS 2003's linker by default, something we don't care about. Since clang-cl always has /bigobj behavior, don't warn that the flag is unused, just ignore it silently. llvm-svn: 248034
* Yet another try at fixing this at every bot.Rafael Espindola2015-09-181-2/+2
| | | | | | This time handle " and - after clang and lld. llvm-svn: 248033
* Relax this test further to pass in other bots.Rafael Espindola2015-09-181-4/+2
| | | | | | | | | The problem this time was the /clang matching the InstalledDir line. Now we just use regular expressions which are more flexible, if a bit less readable, than CHECK+CHECK-SAME. llvm-svn: 248031
* Fix test to pass when the directory name has lld in it.Rafael Espindola2015-09-181-5/+4
| | | | | | | | | | | | | | | CHECK-LABEL assumes that there is only one occurrence of the match. The output looks like: clang version 3.8.0 (trunk 247999) .... /path/to/build/dir/bin/clang-3.8 .... If the path contains lld, the second CHECK-LABEL matches it and we fail since there is no -cc1as between clang and lld. llvm-svn: 248029
* [analyzer] A fix for substraction of an integer from a pointer.Gabor Horvath2015-09-181-0/+17
| | | | | | | | Patch by Artem Dergachev! Differential Revision: http://reviews.llvm.org/D12725 llvm-svn: 248021
* [Static Analyzer] Use generics related information to infer dynamic types.Gabor Horvath2015-09-181-1/+0
| | | | | | Differential Revision: http://reviews.llvm.org/D12916 llvm-svn: 248002
* Suppress amdgpu-toolchain.c for targeting ps4, for now. Investigating.NAKAMURA Takumi2015-09-181-1/+1
| | | | llvm-svn: 248000
* amdgpu-toolchain.c: Add a probe line temporally. Will revert later.NAKAMURA Takumi2015-09-181-0/+1
| | | | llvm-svn: 247997
* clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as ↵NAKAMURA Takumi2015-09-181-1/+1
| | | | | | "non-clang-driver". llvm-svn: 247977
* [OPENMP 4.0] Add 'if' clause for 'cancel' directive.Alexey Bataev2015-09-183-6/+86
| | | | | | Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive. llvm-svn: 247976
* Fix for assertion fail for pragma weak on typedef.Alexander Musman2015-09-181-2/+4
| | | | | | | | | | Example: typedef int __td3; #pragma weak td3 = __td3 Differential Revision: http://reviews.llvm.org/D12904 llvm-svn: 247975
* [Concepts] Moving tests to match the corresponding section of the TSNathan Wilson2015-09-181-0/+0
| | | | llvm-svn: 247966
* clang/test/Driver/myriad-toolchain.c: Tweak for DOSish path.NAKAMURA Takumi2015-09-181-1/+1
| | | | llvm-svn: 247959
* [Myriad]: add "<sysroot>/include" to standard search pathDouglas Katzman2015-09-171-0/+9
| | | | llvm-svn: 247948
* Support __builtin_ms_va_list.Charles Davis2015-09-179-9/+267
| | | | | | | | | | | | | | | | | | Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate for this because `va_list` is defined differently in the Win64 ABI vs. the System V/AMD64 ABI. Depends on D1622. Reviewers: rsmith, rnk, rjmccall CC: cfe-commits Differential Revision: http://reviews.llvm.org/D1623 llvm-svn: 247941
* [Shave]: Rename test file from 'shave-' to 'myriad-'Douglas Katzman2015-09-171-0/+0
| | | | llvm-svn: 247926
* [Shave]: Drive sparc-myriad-elf-ld directly rather than via gcc.Douglas Katzman2015-09-172-5/+18
| | | | | | Differential Revision: http://reviews.llvm.org/D12541 llvm-svn: 247924
* Use the MSVC SEH personalities on MingwReid Kleckner2015-09-171-0/+10
| | | | | | | | Mingw generally wraps an old copy of msvcrt.dll which has these personalities, so things should work out, or so I hear. I haven't tested it. llvm-svn: 247902
* re-apply r.247881Asaf Badouh2015-09-171-0/+576
| | | | | | fixed the tests. llvm-svn: 247892
* revert r.247881 due to tests failuresAsaf Badouh2015-09-171-577/+0
| | | | llvm-svn: 247883
* Appease clang/test/CodeGen/avx512dq-builtins.c for -Asserts, for now.NAKAMURA Takumi2015-09-171-0/+1
| | | | llvm-svn: 247882
* [X86][AVX512DQ] add new intrinsicsAsaf Badouh2015-09-171-0/+577
| | | | | | | | | | | | convert i64 to FP and vice versa reduceps & reducepd rangeps & rangepd all in their 512bit versions Differential Revision: http://reviews.llvm.org/D11716 llvm-svn: 247881
OpenPOWER on IntegriCloud