| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes two bugs in clang-format where the template wrapper doesn't skip over
comments causing a long template declaration to not be split into multiple lines.
These were latent and exposed by r332436.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47257
llvm-svn: 333085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
We fail to import a `ClassTemplateDecl` if the "To" context already
contains a definition and then a forward decl. This is because
`localUncachedLookup` does not find the definition. This is not a
lookup error, the parser behaves differently than assumed in the
importer code. A `DeclContext` contains one DenseMap (`LookupPtr`)
which maps names to lists. The list is a special list `StoredDeclsList`
which is optimized to have one element. During building the initial
AST, the parser first adds the definition to the `DeclContext`. Then
during parsing the second declaration (the forward decl) the parser
again calls `DeclContext::addDecl` but that will not add a new element
to the `StoredDeclsList` rarther it simply overwrites the old element
with the most recent one. This patch fixes the error by finding the
definition in the redecl chain. Added tests for the same issue with
`CXXRecordDecl` and with `ClassTemplateSpecializationDecl`. These tests
pass and they pass because in `VisitRecordDecl` and in
`VisitClassTemplateSpecializationDecl` we already use
`D->getDefinition()` after the lookup.
Reviewers: a.sidorin, xazax.hun, szepet
Subscribers: rnkovacs, dkrupp, cfe-commits
Differential Revision: https://reviews.llvm.org/D46950
llvm-svn: 333082
|
|
|
|
| |
llvm-svn: 333080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The blob data is unaligned, so we also should read it as such. Should fix the random failures with the sanitizer builds.
Reviewers: rsmith, v.g.vassilev
Reviewed By: v.g.vassilev
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D47247
llvm-svn: 333069
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
array initializers"
It caused asserts, see PR37560.
> Use zeroinitializer for (trailing zero portion of) large array initializers
> more reliably.
>
> Clang has two different ways it emits array constants (from InitListExprs and
> from APValues), and both had some ability to emit zeroinitializer, but neither
> was able to catch all cases where we could use zeroinitializer reliably. In
> particular, emitting from an APValue would fail to notice if all the explicit
> array elements happened to be zero. In addition, for large arrays where only an
> initial portion has an explicit initializer, we would emit the complete
> initializer (which could be huge) rather than emitting only the non-zero
> portion. With this change, when the element would have a suffix of more than 8
> zero elements, we emit the array constant as a packed struct of its initial
> portion followed by a zeroinitializer constant for the trailing zero portion.
>
> In passing, I found a bug where SemaInit would sometimes walk the entire array
> when checking an initializer that only covers the first few elements; that's
> fixed here to unblock testing of the rest.
>
> Differential Revision: https://reviews.llvm.org/D47166
llvm-svn: 333067
|
|
|
|
|
|
|
|
| |
(1) I added some \see cross-references to a few select intrinsics that are related (and have the same or similar semantics).
(2) pmmintrin.h, smmintrin.h, xmmintrin.h have very few minor formatting changes. They make rendering of our intrinsics documentation better.
llvm-svn: 333065
|
|
|
|
|
|
| |
These are implementation helper macros we shouldn't expose them to user code if we don't need to.
llvm-svn: 333064
|
|
|
|
|
|
|
|
| |
feeding it to set1.
Previously we negated the whole vector after splatting infinity. But its better to negate the infinity before splatting. This generates IR with the negate already folded with the infinity constant.
llvm-svn: 333062
|
|
|
|
|
|
| |
CGBuiltin.cpp. Just wrap a select builtin around them in the header file instead.
llvm-svn: 333061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dest buffer
Again, strlc* does not return a pointer so the zero size case doest not fit.
Reviewers: NoQ, george.karpenkov
Reviewed by: NoQ
Differential Revision: https://reviews.llvm.org/D47007
llvm-svn: 333060
|
|
|
|
| |
llvm-svn: 333059
|
|
|
|
|
|
|
|
| |
without crashing
rdar://40447209
llvm-svn: 333046
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more reliably.
Clang has two different ways it emits array constants (from InitListExprs and
from APValues), and both had some ability to emit zeroinitializer, but neither
was able to catch all cases where we could use zeroinitializer reliably. In
particular, emitting from an APValue would fail to notice if all the explicit
array elements happened to be zero. In addition, for large arrays where only an
initial portion has an explicit initializer, we would emit the complete
initializer (which could be huge) rather than emitting only the non-zero
portion. With this change, when the element would have a suffix of more than 8
zero elements, we emit the array constant as a packed struct of its initial
portion followed by a zeroinitializer constant for the trailing zero portion.
In passing, I found a bug where SemaInit would sometimes walk the entire array
when checking an initializer that only covers the first few elements; that's
fixed here to unblock testing of the rest.
Differential Revision: https://reviews.llvm.org/D47166
llvm-svn: 333044
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clang builtins have the same semantics as the stdlib functions.
The stdlib functions are defined in section 7.20.6.1 of the C standard with:
"If the result cannot be represented, the behavior is undefined."
That lets us mark the negation with 'nsw' because "sub i32 0, INT_MIN" would
be UB/poison.
Differential Revision: https://reviews.llvm.org/D47202
llvm-svn: 333038
|
|
|
|
|
|
|
|
|
|
| |
intrinsics into f16cintrin.h and remove __emmintrin_f16c.h
These were included in emmintrin.h to match Intel Intrinsics Guide documentation. But this is because icc is capable of emulating them on targets that don't support F16C using library calls. Clang/LLVM doesn't have this emulation support. So it makes more sense to include them in immintrin.h instead.
I've left a comment behind to hopefully deter someone from trying to move them again in the future.
llvm-svn: 333033
|
|
|
|
|
|
| |
CGBuiltin.cpp. Just wrap a select builtin around them in the header file instead.
llvm-svn: 333027
|
|
|
|
| |
llvm-svn: 333026
|
|
|
|
|
|
| |
in r333014.
llvm-svn: 333023
|
|
|
|
|
|
| |
I missed this in r333014
llvm-svn: 333020
|
|
|
|
|
|
|
|
|
|
|
|
| |
emmintrin.h. Move 256-bit f16c intrinsics back to f16cintrin.h
Intel documents the 128-bit versions as being in emmintrin.h and the 256-bit version as being in immintrin.h.
This patch makes a new __emmtrin_f16c.h to hold the 128-bit versions to be included from emmintrin.h. And makes the existing f16cintrin.h contain the 256-bit versions and include it from immintrin.h with an error if its included directly.
Differential Revision: https://reviews.llvm.org/D47174
llvm-svn: 333014
|
|
|
|
|
|
|
|
|
| |
clang."
As well as two follow-on commits r332906, r332911 with a fix for
test clang/test/CodeGen/split-debug-filename.c.
llvm-svn: 333013
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiline receiver"
Summary: Reverts D46879
Reviewers: benhamilton
Reviewed By: benhamilton
Subscribers: krasimir, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47205
llvm-svn: 332998
|
|
|
|
|
|
| |
Due to regression on arm.
llvm-svn: 332991
|
|
|
|
|
|
|
|
| |
We chose the 'slt' form as canonical in IR with:
rL332819
...so we should generate that form directly for efficiency.
llvm-svn: 332989
|
|
|
|
| |
llvm-svn: 332988
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca
without casting to default addr space.
ActiveFlag is a temporary variable emitted for clean up. It is defined as AllocaInst* type and there is
a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer causes assertion in
SetActiveFlag.
Since there is only load/store of ActiveFlag, it is safe to use the original alloca, therefore use
CreateMemTempWithoutCast is called.
Differential Revision: https://reviews.llvm.org/D47099
llvm-svn: 332982
|
|
|
|
|
|
|
|
|
| |
This change will help Visual Studio resolve forward references to C++ lambda
routines used by captured variables.
Differential Revision: https://reviews.llvm.org/D45438
llvm-svn: 332975
|
|
|
|
| |
llvm-svn: 332974
|
|
|
|
|
|
| |
This reverts commit r332885 as it broke several greendragon buildbots.
llvm-svn: 332973
|
|
|
|
|
|
| |
This reverts commit r332906 as a dependency to revert r332885.
llvm-svn: 332972
|
|
|
|
|
|
| |
This reverts commit r332911, as a dependency to revert r332885.
llvm-svn: 332971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`is` type annotations can occur at any nesting level. For example:
function x() {
return function y(): a is B { ... };
}
Breaking before the `is` above breaks TypeScript parsing the code. This
change prevents the wrap.
Reviewers: krasimir
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47193
llvm-svn: 332968
|
|
|
|
|
|
| |
Suggested by Gabor Buella.
llvm-svn: 332966
|
|
|
|
|
|
|
|
| |
The test was implicitly capturing the local filesystem layout.
Patch by Hans Wennborg!
llvm-svn: 332965
|
|
|
|
|
|
|
|
| |
equivalent.
Patch by Hans Wennborg!
llvm-svn: 332964
|
|
|
|
| |
llvm-svn: 332963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212
Reviewers: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47191
llvm-svn: 332961
|
|
|
|
|
|
|
| |
Reverted due to buildbot failures.
Seems like isnumber() is some Apple addition to cctype.
llvm-svn: 332957
|
|
|
|
|
|
|
| |
This appears to leak in already on libc++ platforms, but is breaking on
some other targets.
llvm-svn: 332955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This includes initial support for the (hopefully final) updated Objective-C ABI, developed here:
https://github.com/davidchisnall/clang-gnustep-abi-2
It also includes some cleanups and refactoring from older GNU ABIs.
The current version is ELF only, other formats to follow.
Reviewers: rjmccall, DHowett-MSFT
Reviewed By: rjmccall
Subscribers: smeenai, cfe-commits
Differential Revision: https://reviews.llvm.org/D46052
llvm-svn: 332950
|
|
|
|
|
|
| |
without including wmmintrin.h
llvm-svn: 332929
|
|
|
|
|
|
|
|
|
|
| |
Summary: We use uint8_t in this header, so we need to include cstdint.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D47164
llvm-svn: 332913
|
|
|
|
| |
llvm-svn: 332911
|
|
|
|
| |
llvm-svn: 332909
|
|
|
|
| |
llvm-svn: 332906
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction instead.
Because the intrinsics in the headers are implemented as macros, we can't just use a select builtin and pternlog builtin. This would require one of the macro arguments to be used twice. Depending on what was passed to the macro we could expand an expression twice leading to weird behavior. We could maybe declare our local variable in the macro, but that would need to worry about name collisions.
To avoid that just generate IR directly in CGBuiltin.cpp.
Differential Revision: https://reviews.llvm.org/D47125
llvm-svn: 332891
|
|
|
|
|
|
| |
initialization.
llvm-svn: 332886
|
|
|
|
|
|
|
|
| |
Fixes PR37466.
Differential Revision: https://reviews.llvm.org/D47093
llvm-svn: 332885
|
|
|
|
|
|
|
|
|
|
|
|
| |
packed float conversion intrinsics.
I believe this is safe assuming default default FP environment. The conversion might be inexact, but it can never overflow the FP type so this shouldn't be undefined behavior for the uitofp/sitofp instructions.
We already do something similar for scalar conversions.
Differential Revision: https://reviews.llvm.org/D46863
llvm-svn: 332882
|
|
|
|
|
|
|
|
|
|
| |
up to dwo output.
Part of PR37466.
Differential Revision: https://reviews.llvm.org/D47089
llvm-svn: 332881
|