| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 332294
|
|
|
|
|
|
|
|
|
| |
If the name after 'template' is an unresolved using declaration (not containing
'typename'), then we don't yet know if it's a valid template-name, so don't
reject it prior to instantiation. Instead, treat it as naming a dependent
member of the current instantiation.
llvm-svn: 332291
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables in a block
The fixit is actively harmful, as it encourages developers to ignore the
warning and to write unsafe code.
It is almost impossible to write safe code while capturing autoreleasing
variables in the block, as in order to check that the block is never
called in the autoreleasing pool the developer has to check the
transitive closure of all potential callers of the block.
Differential Revision: https://reviews.llvm.org/D46778
llvm-svn: 332288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Also pull #include related style out of FormatStyle as tooling::IncludeStyle.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: klimek, mgorny, cfe-commits, djasper
Differential Revision: https://reviews.llvm.org/D46496
llvm-svn: 332287
|
|
|
|
|
|
|
|
| |
types.
Also improve diagnostic for the case where a type is non-literal because it's a lambda.
llvm-svn: 332286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This will be shared by include insertion/deletion library.
Reviewers: ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: mgorny, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D46758
llvm-svn: 332284
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, given:
void fn() {
struct T *p0;
struct T { int i; } *p1;
}
-ast-print produced:
void fn() {
struct T { int i; } *p0;
struct T { int i; } *p1;
}
Compiling that fails with a redefinition error.
Given:
void fn() {
struct T *p0;
struct __attribute__((deprecated)) T *p1;
}
-ast-print dropped the attribute.
Details:
For a tag specifier (that is, struct/union/class/enum used as a type
specifier in a declaration) that was also a tag declaration (that is,
first occurrence of the tag) or tag redeclaration (that is, later
occurrence that specifies attributes or a member list), clang printed
the tag specifier as either (1) the full tag definition if one
existed, or (2) the first tag declaration otherwise. Redefinition
errors were sometimes introduced, as in the first example above. Even
when that was impossible because no member list was ever specified,
attributes were sometimes lost, thus changing semantics and
diagnostics, as in the second example above.
This patch fixes a major culprit for these problems. It does so by
creating an ElaboratedType with a new OwnedDecl member wherever an
occurrence of a tag type is a (re)declaration of that tag type.
PrintingPolicy's IncludeTagDefinition used to trigger printing of the
member list, attributes, etc. for a tag specifier by using a tag
(re)declaration selected as described above. Now, it triggers the
same thing except it uses the tag (re)declaration stored in the
OwnedDecl. Of course, other tooling can now make use of the new
OwnedDecl as well.
Also, to be more faithful to the original source, this patch
suppresses printing of attributes inherited from previous
declarations.
Reviewed by: rsmith, aaron.ballman
Differential Revision: https://reviews.llvm.org/D45463
llvm-svn: 332281
|
|
|
|
|
|
|
|
|
| |
Some targets have constant address space (e.g. amdgcn). For them string literal should be
emitted in constant address space then casted to default address space.
Differential Revision: https://reviews.llvm.org/D46643
llvm-svn: 332279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For example, given:
#define bool _Bool
_Bool i;
void fn() { 1; }
-ast-print produced:
tmp.c:3:13: warning: expression result unused
void fn() { 1; }
^
bool i;
void fn() {
1;
}
That fails to compile because bool is undefined.
Details:
Diagnostics print _Bool as bool when the latter is defined as the
former. However, diagnostics were altering the printing policy for
-ast-print as well. The printed source was then invalid because the
preprocessor eats the bool definition.
Problematic diagnostics included suppressed warnings (e.g., add
-Wno-unused-value to the above example), including those that are
suppressed by default.
This patch fixes this bug and cleans up some related comments.
Reviewed by: aaron.ballman, rsmith
Differential Revision: https://reviews.llvm.org/D45093
llvm-svn: 332275
|
|
|
|
|
|
|
|
|
|
| |
builtins.
As long as the destination type is a 256 or 128 bit vector with the same number of elements we can use __builtin_convertvector to directly generate trunc IR instruction which will be handled natively by the backend.
Differential Revision: https://reviews.llvm.org/D46742
llvm-svn: 332266
|
|
|
|
|
|
|
|
|
| |
This is a workaround for the issue in buildASTFromCodeWithArgs()
where a local buffer can be used to store the program text
referred by SourceManager.
FIXME: Fix the root issue in buildASTFromCodeWithArgs().
llvm-svn: 332256
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change fixes lack of completions in the following case
('^'designates completion points) :
void f(^);
struct Incomplete;
Incomplete g(^);
Reviewers: bkramer, aaron.ballman, sammccall
Reviewed By: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46639
llvm-svn: 332244
|
|
|
|
| |
llvm-svn: 332236
|
|
|
|
|
|
|
|
|
| |
It breaks the sanitizer build
<http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/23739>
This reverts commit r332228.
llvm-svn: 332232
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Removing the full structor and replacing all usages with the base one
can degrade debug quality as it will leave the debugger unable to locate
the full object structor. This is apparent when evaluating an expression
in the debugger which requires constructing an object of class which has
had this optimization applied to it. When compiling the expression, we
pretend that the class and its methods have been defined in another
compilation unit, so the expression compiler assumes the structor
definition must be available. This didn't use to be the case for
structors with internal linkage. Less aggressive optimizations like
emitting the full structor as an alias remain in place, as they do not
cause the structor symbol to disappear completely.
This improves debug quality on non-darwin platforms (darwin does not
have -mconstructor-aliases on by default, so it is spared these
problems) and enable us to remove some workarounds from LLDB which attempt to
mitigate this issue.
Reviewers: rjmccall, aprantl
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46685
llvm-svn: 332228
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes a regression introduced by `r331857` where we stop the search for
the End token as soon as we hit a non-scope-closer, which prematurely stops before
semicolons for example, which should otherwise be considered as part of the unbreakable tail.
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D46824
llvm-svn: 332225
|
|
|
|
|
|
|
| |
'CC1' was a misleading prefix. Committing so as to simplify the diff for a
patch I'm about to put up for review.
llvm-svn: 332222
|
|
|
|
|
|
| |
_mm512_mask_cvtps_pd and _mm512_maskz_cvtps_pd.
llvm-svn: 332213
|
|
|
|
|
|
|
|
| |
If we're using default rounding mode we can let __builtin_convertvector to generate an fpextend. This matches 128 and 256 bit.
If we're using the version that takes an explicit rounding mode argument we would need to look at the immediate to see if its CUR_DIRECTION.
llvm-svn: 332210
|
|
|
|
|
|
|
|
|
|
| |
_mm_cvtu64_ss.
We can use direct C code for these that will use uitofp and insertelement instructions.
For the versions that take an explicit rounding mode we can't do this.
llvm-svn: 332203
|
|
|
|
|
|
|
|
|
| |
These intrinsics work exactly as all other atomic_fetch_* intrinsics and allow to create *atomicrmw* with ordering.
Updated the clang-extensions document.
Differential Revision: https://reviews.llvm.org/D46386
llvm-svn: 332193
|
|
|
|
| |
llvm-svn: 332164
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PS4 requires clang ABI version 6 for compatibility reasons. This change forces this and if the user specifies a different version when the PS4 target is specified, the compiler emits a warning that the specified version is being ignored.
Reviewers: probinson
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46767
llvm-svn: 332160
|
|
|
|
|
|
|
|
|
| |
The fact that libc++ depends on libc++abi and libunwind is an internal
detail that's captured by the libc++.so linker script.
Differential Revision: https://reviews.llvm.org/D46768
llvm-svn: 332138
|
|
|
|
| |
llvm-svn: 332136
|
|
|
|
|
|
| |
Ensures that the test is being run.
llvm-svn: 332135
|
|
|
|
|
|
| |
ExceptionSpecificationType enumeration is the same as CXCursor_ExceptionSpecificationKind.
llvm-svn: 332130
|
|
|
|
|
|
|
|
|
| |
distribute simd directives.
Directives `target simd` and `target teams distribute simd` must be
executed in non-SPMD mode.
llvm-svn: 332129
|
|
|
|
|
|
|
|
| |
Also introduce --hip-link option to indicate HIP for linking.
Differential Revision: https://reviews.llvm.org/D46475
llvm-svn: 332123
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D46487
llvm-svn: 332122
|
|
|
|
|
|
|
|
|
|
| |
When bundle/unbundle intermediate files for HIP, there may be multiple
sub archs, therefore BoundArch needs to be included in the target
and output file names for clang-offload-bundler.
Differential Revision: https://reviews.llvm.org/D46473
llvm-svn: 332121
|
|
|
|
| |
llvm-svn: 332108
|
|
|
|
| |
llvm-svn: 332105
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D46683
llvm-svn: 332091
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For 'x::template y', consistently give a "no member named 'y' in 'x'"
diagnostic if there is no such member, and give a 'template keyword not
followed by a template' name error if there is such a member but it's not a
template. In the latter case, add a note pointing at the non-template.
Don't suggest inserting a 'template' keyword in 'X::Y<' if X is dependent
if the lookup of X::Y was actually not a dependent lookup and found only
non-templates.
llvm-svn: 332076
|
|
|
|
|
|
| |
MSVC doesn't, so we shouldn't. Fixes PR37232.
llvm-svn: 332074
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
While there, perform a small cleanup, reducing delta
with drivers for other OSes.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, dberris
Reviewed By: dberris
Subscribers: llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D46721
llvm-svn: 332071
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Use the same branch as FreeBSD and OpenBSD.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, dberris, vitalybuka
Reviewed By: vitalybuka
Subscribers: emaste, llvm-commits
Differential Revision: https://reviews.llvm.org/D46737
llvm-svn: 332070
|
|
|
|
| |
llvm-svn: 332053
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
adding function: `Cursor.get_included_file` , so the C API's `clang_getIncludedFile` function is available on the python binding interface
also adding test to unittests
related ticket: https://bugs.llvm.org/show_bug.cgi?id=15223
Reviewers: mgorny, arphaman, jbcoe
Reviewed By: jbcoe
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46383
Patch by jlaz (József Láz)
llvm-svn: 332045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The Itanium ABI requires that the type info for pointer-to-incomplete types to have internal linkage, so that it doesn't interfere with the type info once completed. Currently it also marks the type info name as internal as well. However, this causes a bug with the STL implementations, which use the type info name pointer to perform ordering and hashing of type infos.
For example:
```
// header.h
struct T;
extern std::type_info const& Info;
// tu_one.cpp
#include "header.h"
std::type_info const& Info = typeid(T*);
// tu_two.cpp
#include "header.h"
struct T {};
int main() {
auto &TI1 = Info;
auto &TI2 = typeid(T*);
assert(TI1 == TI2); // Fails
assert(TI1.hash_code() == TI2.hash_code()); // Fails
}
```
This patch fixes the STL bug by emitting the type info name as linkonce_odr when the type-info is for a pointer-to-incomplete type.
Note that libc++ could fix this without a compiler change, but the quality of fix would be poor. The library would either have to:
(A) Always perform strcmp/string hashes.
(B) Determine if we have a pointer-to-incomplete type, and only do strcmp then. This would require an ABI break for libc++.
Reviewers: rsmith, rjmccall, majnemer, vsapsai
Reviewed By: rjmccall
Subscribers: smeenai, cfe-commits
Differential Revision: https://reviews.llvm.org/D46665
llvm-svn: 332028
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit relands r331904.
Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective
in PPCallbacks, and updating calls to that function. This will be useful
in https://reviews.llvm.org/D43778 to determine which includes are
system
headers.
Differential Revision: https://reviews.llvm.org/D46614
llvm-svn: 332021
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fixes PR35772.
Reviewers: rsmith
Differential Revision: https://reviews.llvm.org/D43320
llvm-svn: 332018
|
|
|
|
|
|
|
|
| |
Added initial support for L2 parallelism in SPMD mode. Note, though,
that the orphaned parallel directives are not currently supported in
SPMD mode.
llvm-svn: 332016
|
|
|
|
|
|
|
|
| |
when current field is not legal integer type.
Differential Revision: https://reviews.llvm.org/D39053
llvm-svn: 331979
|
|
|
|
|
|
| |
Patch by Adam Conrad
llvm-svn: 331965
|
|
|
|
|
|
|
| |
This reverts commit r331957. It seems to be causing failures
on ppc64le-linux.
llvm-svn: 331963
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: craig.topper, RKSimon
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D46540
llvm-svn: 331962
|
|
|
|
|
|
|
|
|
|
| |
not use a 512-bit intermediate vector.
This is unnecessary for AVX512VL supporting CPUs like SKX. We can just emit a 128-bit masked load/store here no matter what. The backend will widen it to 512-bits on KNL CPUs.
Fixes the frontend portion of PR37386. Need to fix the backend to optimize the new sequences well.
llvm-svn: 331958
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The Itanium ABI requires that the type info for pointer-to-incomplete types to have internal linkage, so that it doesn't interfere with the type info once completed. Currently it also marks the type info name as internal as well. However, this causes a bug with the STL implementations, which use the type info name pointer to perform ordering and hashing of type infos.
For example:
```
// header.h
struct T;
extern std::type_info const& Info;
// tu_one.cpp
#include "header.h"
std::type_info const& Info = typeid(T*);
// tu_two.cpp
#include "header.h"
struct T {};
int main() {
auto &TI1 = Info;
auto &TI2 = typeid(T*);
assert(TI1 == TI2); // Fails
assert(TI1.hash_code() == TI2.hash_code()); // Fails
}
```
This patch fixes the STL bug by emitting the type info name as linkonce_odr when the type-info is for a pointer-to-incomplete type.
Note that libc++ could fix this without a compiler change, but the quality of fix would be poor. The library would either have to:
(A) Always perform strcmp/string hashes.
(B) Determine if we have a pointer-to-incomplete type, and only do strcmp then. This would require an ABI break for libc++.
Reviewers: rsmith, rjmccall, majnemer, vsapsai
Reviewed By: rjmccall
Subscribers: smeenai, cfe-commits
Differential Revision: https://reviews.llvm.org/D46665
llvm-svn: 331957
|