| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MSVC doesn't extend integer types smaller than 64bit, so to preserve
binary compatibility, clang shouldn't either.
For example, the following C code built with MSVC:
unsigned test(unsigned v);
unsigned foobar(unsigned short);
int main() { return test(0xffffffff) + foobar(28); }
Produces the following:
0000000000000004: B9 FF FF FF FF mov ecx,0FFFFFFFFh
0000000000000009: E8 00 00 00 00 call test
000000000000000E: 89 44 24 20 mov dword ptr [rsp+20h],eax
0000000000000012: 66 B9 1C 00 mov cx,1Ch
0000000000000016: E8 00 00 00 00 call foobar
And as you can see, when setting up the call to foobar, only cx is overwritten.
If foobar is compiled with clang, then the zero extension added by clang means
the rest of the register, which contains garbage, could be used.
For example if foobar is:
unsigned foobar(unsigned short v) {
return v;
}
Compiled with clang -fomit-frame-pointer -O3 gives the following assembly:
foobar:
0000000000000000: 89 C8 mov eax,ecx
0000000000000002: C3 ret
And that function would return garbage because the 16 most significant bits of
ecx still contain garbage from the first call.
With this change, the code for that function is now:
foobar:
0000000000000000: 0F B7 C1 movzx eax,cx
0000000000000003: C3 ret
Reviewers: chapuni, rnk
Reviewed By: rnk
Subscribers: majnemer, cfe-commits
Differential Revision: http://reviews.llvm.org/D4380
llvm-svn: 216491
|
| |
|
|
| |
llvm-svn: 216490
|
| |
|
|
| |
llvm-svn: 216489
|
| |
|
|
| |
llvm-svn: 216485
|
| |
|
|
|
|
|
|
| |
overloads, and conversion functions.
Patch by Craig Tenenbaum!
llvm-svn: 216480
|
| |
|
|
| |
llvm-svn: 216479
|
| |
|
|
| |
llvm-svn: 216478
|
| |
|
|
| |
llvm-svn: 216477
|
| |
|
|
| |
llvm-svn: 216476
|
| |
|
|
|
|
|
|
|
| |
lowering of the intrinsics.
Prior to this commit, most of the copy-related intrinsics could be optimized
away. The situation is still not ideal as there are several possibilities to
lower a given intrinsic. Currently, we match LLVM behavior.
llvm-svn: 216474
|
| |
|
|
|
|
| |
flag.
llvm-svn: 216472
|
| |
|
|
|
|
|
|
| |
feature is c11 about nested struct declarations must have
struct-declarator-list. Without this change, code
which was meant for c99 breaks. rdar://18125536
llvm-svn: 216469
|
| |
|
|
| |
llvm-svn: 216467
|
| |
|
|
| |
llvm-svn: 216463
|
| |
|
|
|
|
| |
vectors, so this fixes a broken build from r216385.
llvm-svn: 216457
|
| |
|
|
|
|
|
|
| |
path separators as well as case sensitivity of the "no" in "no such file or directory." Rather than revert this file back to its original form, I've made some incredibly ugly regexes so that it will pass everywhere.
Note, the path this test reports a failure on (for my Windows setup) is: E:\llvm\llvm\tools\clang\test\Frontend/doesnotexist/somename
llvm-svn: 216456
|
| |
|
|
|
|
| |
This completes all ACLE hint intrinsics.
llvm-svn: 216453
|
| |
|
|
| |
llvm-svn: 216452
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
int a[5];
a[3] += 42;
After:
int a[ 5 ];
a[ 3 ] += 42;
Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887).
Patch by Marek Kurdej, thank you!
llvm-svn: 216449
|
| |
|
|
|
|
|
| |
With this patch, "check-asan" passes all the tests with both MT and MD ASan RTL if you set COMPILER_RT_BUILD_SHARED_ASAN to ON
(PR20214)
llvm-svn: 216447
|
| |
|
|
|
|
|
| |
Insert the LDREX/STREX instruction sequence specified in ARM ACLE 2.0,
as SWP instruction is deprecated since ARMv6.
llvm-svn: 216446
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
std::vector<int> v = {
1, 0 /* comment */
};
After:
std::vector<int> v = {1, 0 /* comment */};
llvm-svn: 216445
|
| |
|
|
| |
llvm-svn: 216438
|
| |
|
|
|
|
|
| |
pattern of an alias template declaration. Use this to merge alias templates
properly when they're members of class template specializations.
llvm-svn: 216437
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
PR19838
When operator new[] is called and an array cookie is created
we want asan to detect buffer overflow bugs that touch the cookie.
For that we need to
a) poison the shadow for the array cookie (call __asan_poison_cxx_array_cookie).
b) ignore the legal accesses to the cookie generated by clang (add 'nosanitize' metadata)
Reviewers: timurrrr, samsonov, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4774
llvm-svn: 216434
|
| |
|
|
| |
llvm-svn: 216417
|
| |
|
|
|
|
| |
into EmitSynthesizedCXXCopyCtorCall. No functionality change.
llvm-svn: 216410
|
| |
|
|
|
|
|
| |
implementation but not anywhere else.
rdar://16628028
llvm-svn: 216408
|
| |
|
|
|
|
| |
with auto-boxing syntax for literals. rdar://18080352
llvm-svn: 216405
|
| |
|
|
|
|
|
|
|
|
|
| |
into EmitCXXMemberOrOperatorCall methods. In the end we want
to make declaration visible in EmitCallArgs() method, that
would allow us to alter CodeGen depending on function/parameter
attributes.
No functionality change.
llvm-svn: 216404
|
| |
|
|
| |
llvm-svn: 216397
|
| |
|
|
|
|
|
|
|
| |
Error caught using -fsanitize=pointer-overflow.
Expand ASTVectorTest to verify basic behavior,
test fails without functionality in this patch.
llvm-svn: 216385
|
| |
|
|
| |
llvm-svn: 216381
|
| |
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D5026
llvm-svn: 216380
|
| |
|
|
|
|
|
|
| |
Delete special-case CUDA attribute matchers.
Patch by Jacques Pienaar.
llvm-svn: 216379
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This fixed llvm.org/PR20712.
Before:
int i = (int)(int) -2;
After:
int i = (int)(int)-2;
llvm-svn: 216378
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Before:
f(FirstToken->WhitespaceRange.getBegin().getLocWithOffset(
First->LastNewlineOffset));
After:
f(FirstToken->WhitespaceRange.getBegin()
.getLocWithOffset(First->LastNewlineOffset));
llvm-svn: 216377
|
| |
|
|
| |
llvm-svn: 216370
|
| |
|
|
|
|
|
|
|
|
| |
declarations. We can't expect to find them in the canonical definition
of the class, because that's not where they live.
This means we no longer reject real ODR violations with friend declarations,
but we weren't consistently doing so anyway.
llvm-svn: 216369
|
| |
|
|
| |
llvm-svn: 216352
|
| |
|
|
|
|
| |
NFC.
llvm-svn: 216347
|
| |
|
|
|
|
|
|
|
|
|
|
| |
__vector long is deprecated, but __vector long long is not. As a result, we
cannot check for __vector long (to issue the deprecation warning) as we parse
the type because we need to know how many 'long's we have first.
DeclSpec::Finish seems like a more-appropriate place to perform the check
(which places it with several other similar Altivec vector checks).
Fixes PR20720.
llvm-svn: 216342
|
| |
|
|
|
|
|
|
|
|
|
| |
PowerPC uses the special PPC_FP128 type for long double on Linux, which is
composed of two 64-bit doubles. The higher-order double (which contains the
overall sign) comes first, and so the __builtin_signbitl implementation
requires special handling to extract the sign bit.
Fixes PR20691.
llvm-svn: 216341
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instantiation (PR20137)
We would previously assert (a decl cannot have two DLL attributes) on this code:
template <typename T> struct __declspec(dllimport) S { T f() { return T(); } };
template struct __declspec(dllexport) S<int>;
The problem was that when instantiating, we would take the attribute from the
template even if the instantiation itself already had an attribute.
Also, don't inherit DLL attributes from the template to its members before
instantiation, as the attribute may change.
I couldn't figure out what MinGW does here, so I'm leaving that open. At least
we're not asserting anymore.
llvm-svn: 216340
|
| |
|
|
| |
llvm-svn: 216337
|
| |
|
|
|
|
| |
commit.
llvm-svn: 216334
|
| |
|
|
| |
llvm-svn: 216333
|
| |
|
|
|
|
| |
The same dyn_cast was done earlier in the function. No functionality change.
llvm-svn: 216326
|
| |
|
|
|
|
|
| |
We would accidently initialize unnamed bitfields instead of the
following field.
llvm-svn: 216313
|
| |
|
|
|
|
|
| |
purposes, look for other typedefs with that same name and merge into their
named tag declaration if there is one.
llvm-svn: 216312
|