| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wa,-mhard-float.
Patch by Scott Egerton.
Reviewers: vkalintiris, dsanders
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12600
llvm-svn: 248276
|
|
|
|
| |
llvm-svn: 248235
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 248185
|
|
|
|
| |
llvm-svn: 248184
|
|
|
|
|
|
|
|
| |
This was committed without the code review (http://reviews.llvm.org/D12938) being approved.
This reverts commit r248154.
llvm-svn: 248173
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 248142
|
|
|
|
| |
llvm-svn: 248127
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
identifiers, and extend existing test to also cover C++.
llvm-svn: 248079
|
|
|
|
|
|
| |
dealing with forward declarations.
llvm-svn: 248065
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 248051
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D12973
llvm-svn: 248041
|
|
|
|
| |
llvm-svn: 248035
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This time handle " and - after clang and lld.
llvm-svn: 248033
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Patch by Artem Dergachev!
Differential Revision: http://reviews.llvm.org/D12725
llvm-svn: 248021
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D12916
llvm-svn: 248002
|
|
|
|
| |
llvm-svn: 248000
|
|
|
|
| |
llvm-svn: 247997
|
|
|
|
|
|
| |
"non-clang-driver".
llvm-svn: 247977
|
|
|
|
|
|
| |
Add parsing, sema analysis and codegen for 'if' clause in 'cancel' directive.
llvm-svn: 247976
|
|
|
|
|
|
|
|
|
|
| |
Example:
typedef int __td3;
#pragma weak td3 = __td3
Differential Revision: http://reviews.llvm.org/D12904
llvm-svn: 247975
|
|
|
|
| |
llvm-svn: 247966
|
|
|
|
| |
llvm-svn: 247959
|
|
|
|
| |
llvm-svn: 247948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 247926
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D12541
llvm-svn: 247924
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
fixed the tests.
llvm-svn: 247892
|
|
|
|
| |
llvm-svn: 247883
|
|
|
|
| |
llvm-svn: 247882
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|