- Jul 31, 2017
-
-
Martin Storsjo authored
Differential Revision: https://reviews.llvm.org/D36099 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309618 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
A change to InstCombine broke this test, but we generally frown on running optimizations clang tests anyway. So I've updated the checks to not depend on optimizations anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309616 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
deployment target is earlier than iOS 11 and the target is 32-bit. This is a follow-up to r306922. rdar://problem/32230613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309607 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joey Gouly authored
This fixes the test, so that it can be run on different hosts that may have different OpenCL extensions enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309571 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexander Kornienko authored
Summary: Fixes http://llvm.org/PR33947. https://godbolt.org/g/54XRMT void f(int a) { struct A { void g(int a) {} A() { int a; } }; } 3 : <source>:3:16: warning: declaration shadows a local variable [-Wshadow] void g(int a) {} ^ 1 : <source>:1:12: note: previous declaration is here void f(int a) { ^ 4 : <source>:4:15: warning: declaration shadows a local variable [-Wshadow] A() { int a; } ^ 1 : <source>:1:12: note: previous declaration is here void f(int a) { ^ 2 warnings generated. The local variable `a` of the function `f` can't be accessed from a method of the function-local class A, thus no shadowing occurs and no diagnostic is needed. Reviewers: rnk, rsmith, arphaman, Quuxplusone Reviewed By: rnk, Quuxplusone Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D35941 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309569 91177308-0d34-0410-b5e6-96231b3b80d8
-
Joey Gouly authored
Check the subgroup extension is enabled, before doing other Sema checks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309567 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
about unterminated push directives that are followed by a reset ('#pragma pack()') This has been suggested by Hans Wennborg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309559 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
Summary: Previously Clang incorrectly ignored the expression of a void `co_return`. This patch addresses that bug. I'm not quite sure if I got the code-gen right, but this patch is at least a start. Reviewers: rsmith, GorNishanov Reviewed By: rsmith, GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36070 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309545 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
Summary: Previously Clang was not considering operator declarations that occur at function scope. This is incorrect according to [over.match.oper]p3 > The set of non-member candidates is the result of the unqualified lookup of operator@ in the context of the expression according to the usual rules for name lookup in unqualified function calls. This patch changes operator name lookup to consider block scope declarations. This patch fixes PR27027. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D35297 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309530 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 30, 2017
-
-
Brad Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309523 91177308-0d34-0410-b5e6-96231b3b80d8
-
Brad Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309522 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
MS ignores the keyword "short" when used after a jc/jz instruction, LLVM ought to do the same. llvm: D35892 Differential Revision: https://reviews.llvm.org/D35893 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309510 91177308-0d34-0410-b5e6-96231b3b80d8
-
Coby Tayree authored
Allows the incorporation of legit (x86) Control Regs within inline asm stataements Differential Revision: https://reviews.llvm.org/D35903 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309508 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
This led to crashes as the line number cache would report a bogus line number for a line of code, and we'd try to find a nonexistent column within the line when printing diagnostics. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309503 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 29, 2017
-
-
Simon Pilgrim authored
Clang specifies a max type alignment of 16 bytes on darwin targets (annoyingly in the driver not via cc1), meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores. This patch casts the vectors to explicitly aligned types prior to the load/store to ensure that the require alignment is respected. Differential Revision: https://reviews.llvm.org/D35996 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309488 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
The path to one of my source trees contains 'builtin' as a substring, so this test failed. Fix it with FileCheck. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309460 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vedant Kumar authored
On some targets, passing zero to the clz() or ctz() builtins has undefined behavior. I ran into this issue while debugging UB in __hash_table from libcxx: the bug I was seeing manifested itself differently under -O0 vs -Os, due to a UB call to clz() (see: libcxx/r304617). This patch introduces a check which can detect UB calls to builtins. llvm.org/PR26979 Differential Revision: https://reviews.llvm.org/D34590 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309459 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 28, 2017
-
-
Adrian Prantl authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309427 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
'#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files The second recommit (r309106) was reverted because the "non-default #pragma pack value chages the alignment of struct or union members in the included file" warning proved to be too aggressive for external projects like Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=749197). This recommit makes the problematic warning a non-default one, and gives it the -Wpragma-pack-suspicious-include warning option. The first recommit (r308441) caused a "non-default #pragma pack value might change the alignment of struct or union members in the included file" warning in LLVM itself. This recommit tweaks the added warning to avoid warnings for #includes that don't have any records that are affected by the non-default alignment. This tweak avoids the previously emitted warning in LLVM. Original message: This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309386 91177308-0d34-0410-b5e6-96231b3b80d8
-
Simon Pilgrim authored
[X86] Add tests showing inability of vector non-temporal load/store intrinsic to force pointer alignment (PR33830) Clang specifies a max type alignment of 16 bytes on darwin targets, meaning that the builtin nontemporal stores don't correctly align the loads/stores to 32 or 64 bytes when required, resulting in lowering to temporal unaligned loads/stores. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309382 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309352 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kostya Serebryany authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309338 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 27, 2017
-
-
Martin Storsjo authored
This tests the ARM64 specific constants added in SVN r309081, similar to the one added in r277928 for armintr.h. Differential Revision: https://reviews.llvm.org/D35934 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309314 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
According to upcoming OpenMP 5.0 all addressable lvalue expressions are allowed in deoend clause. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309309 91177308-0d34-0410-b5e6-96231b3b80d8
-
Akira Hatanaka authored
r303175 made changes to have __cxa_allocate_exception return a 16-byte aligned pointer, so it's no longer necessary to specify a lower alignment (8-bytes) for exception objects on Darwin. rdar://problem/32363695 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309308 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erich Keane authored
When an omp for loop is canceled the constructed objects are being destructed twice. It looks like the desired code is: { Obj o; If (cancelled) branch-through-cleanups to cancel.exit. } [cleanups] cancel.exit: __kmpc_for_static_fini br cancel.cont (*) cancel.cont: __kmpc_barrier return The problem seems to be the branch to cancel.cont is currently also going through the cleanups calling them again. This change just does a direct branch instead. Patch By: michael.p.rice@intel.com Differential Revision: https://reviews.llvm.org/D35854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309288 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Added codegen for task-based directive with in_reduction clause. ``` <body> ``` The next code is emitted: ``` void *td; ... td = call i8* @__kmpc_task_reduction_init(); ... <type> *priv = (<type> *)call i8* @__kmpc_task_reduction_get_th_data(i32 GTID, i8* td, i8* <orig>) ``` git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309270 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Smith authored
Re-commit r309257 with less precise register checks in arm-float-helpers.c test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309263 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Smith authored
The test arm-float-helpers.c appears to be failing on some builders and needs some work to make it more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309259 91177308-0d34-0410-b5e6-96231b3b80d8
-
Peter Smith authored
The ARM Runtime ABI document (IHI0043) defines the AEABI floating point helper functions in 4.1.2 The floating-point helper functions. These functions always use the base PCS (soft-fp). However helper functions defined outside of this document such as the complex-number multiply and divide helpers are not covered by this requirement and should use hard-float PCS if the target is hard-float as both compiler-rt and libgcc for a hard-float sysroot implement these functions with a hard-float PCS. All of the floating point helper functions that are explicitly soft float are expanded in the llvm ARM backend. This change makes clang not force the BuiltinCC to AAPCS for AAPCS_VFP. With this change the ARM compiler-rt tests involving _Complex pass with both hard-fp and soft-fp targets. Differential Revision: https://reviews.llvm.org/D35538 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309257 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nemanja Ivanovic authored
This just adds the CPU to a list of commands passed to GAS when not using the integrated assembler. Differential Revision: https://reviews.llvm.org/D33820 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309256 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
The initializer for a static local variable cannot be hot, because it runs at most once per program. That's not quite the same thing as having a low branch probability, but under the assumption that the function is invoked many times, modeling this as a branch probability seems reasonable. For TLS variables, the situation is less clear, since the initialization side of the branch can run multiple times in a program execution, but we still expect initialization to be rare relative to non-initialization uses. It would seem worthwhile to add a PGO counter along this path to make this estimation more accurate in future. For globals with guarded initialization, we don't yet apply any branch weights. Due to our use of COMDATs, the guard will be reached exactly once per DSO, but we have no idea how many DSOs will define the variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309195 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 26, 2017
-
-
Hans Wennborg authored
The warning fires on non-suspicious code in Chromium. Reverting until a solution is figured out. > Recommit r308327 2nd time: Add a warning for missing > '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files > > The first recommit (r308441) caused a "non-default #pragma pack value might > change the alignment of struct or union members in the included file" warning > in LLVM itself. This recommit tweaks the added warning to avoid warnings for > #includes that don't have any records that are affected by the non-default > alignment. This tweak avoids the previously emitted warning in LLVM. > > Original message: > > This commit adds a new -Wpragma-pack warning. It warns in the following cases: > > - When a translation unit is missing terminating #pragma pack (pop) directives. > - When entering an included file if the current alignment value as determined > by '#pragma pack' directives is different from the default alignment value. > - When leaving an included file that changed the state of the current alignment > value. > > rdar://10184173 > > Differential Revision: https://reviews.llvm.org/D35484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309186 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Sotkin authored
Subscribers: cfe-commits, yaxunl, Anastasia Differential Revision: https://reviews.llvm.org/D35420 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309155 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309118 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
with an availability attribute to silence" note rdar://33539233 Differential Revision: https://reviews.llvm.org/D35726 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309116 91177308-0d34-0410-b5e6-96231b3b80d8
-
Yuka Takahashi authored
Summary: `clang --autocomplete=-std` will show ``` -std: Language standard to compile for -std= Language standard to compile for -stdlib= C++ standard library to use ``` after this change. However, showing HelpText with completion in bash seems super tricky, so this feature will be used in other shells (fish, zsh...). Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35759 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309113 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
'#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files The first recommit (r308441) caused a "non-default #pragma pack value might change the alignment of struct or union members in the included file" warning in LLVM itself. This recommit tweaks the added warning to avoid warnings for #includes that don't have any records that are affected by the non-default alignment. This tweak avoids the previously emitted warning in LLVM. Original message: This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309106 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
std::byte, when defined as an enum, needs to be given special treatment with regards to its aliasing properties. An array of std::byte is allowed to be used as storage for other types. This fixes PR33916. Differential Revision: https://reviews.llvm.org/D35824 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309058 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309054 91177308-0d34-0410-b5e6-96231b3b80d8
-