| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
postincrement to avoid creating and immediately discarding a temporary APInt.
This is preparation for a clang change to improve the [[nodiscard]] warning to not be ignored on methods that return a class marked [[nodiscard]] that are defined in the class itself. See D32207.
llvm-svn: 300756
|
| |
|
|
| |
llvm-svn: 300744
|
| |
|
|
| |
llvm-svn: 300741
|
| |
|
|
| |
llvm-svn: 300738
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR32679)
The coverage implementation marks functions which won't be emitted as
'deferred', so that it can emit empty coverage regions for them later
(once their linkages are known).
Functions in dependent contexts are an exception: if there isn't a full
instantiation of a function, it shouldn't be marked 'deferred'. We've
been breaking that rule without much consequence because we just ended
up with useless, extra, empty coverage mappings. With PR32679, this
behavior finally caused a crash, because clang marked a partial template
specialization as 'deferred', causing the MS mangler to choke in its
delayed-template-parsing mode:
error: cannot mangle this template type parameter type yet
(http://bugs.llvm.org/show_bug.cgi?id=32679)
Fix this by checking if a decl's context is a dependent context before
marking it 'deferred'.
Based on a patch by Adam Folwarczny!
Differential Revision: https://reviews.llvm.org/D32144
llvm-svn: 300723
|
| |
|
|
|
|
|
|
| |
rdar://problem/31635406
Differential Revision: https://reviews.llvm.org/D32187
llvm-svn: 300722
|
| |
|
|
|
|
|
|
| |
This should simplify the call sites, which typically want to tweak one
attribute at a time. It should also avoid creating ephemeral
AttributeLists that live forever.
llvm-svn: 300718
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit the external_source_symbol attribute wasn't supported by
#pragma clang attribute for the following two reasons:
- The Named attribute subject hasn't been supported by TableGen.
- There was no way to specify a subject match rule for #pragma clang attribute
that could operate on a set of attribute subjects (e.g. the ones that derive
from NamedDecl).
This commit fixes the two issues and thus adds external_source_symbol support to
#pragma clang attribute.
rdar://31169028
Differential Revision: https://reviews.llvm.org/D32176
llvm-svn: 300712
|
| |
|
|
|
|
|
|
| |
Patch by: Gergely Angeli!
Differential Revision: https://reviews.llvm.org/D31938
llvm-svn: 300703
|
| |
|
|
|
|
|
|
| |
While at it, extend test for FreeBSD and check for -lrt iff on Linux.
Differential Revision: https://reviews.llvm.org/D30087
llvm-svn: 300689
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under -fms-extensions __unaligned is a type-qualifier that can be applied to a
non-static member function declaration.
This causes an assertion when mangling the name under Itanium, where that
qualifier is not mangled.
This patch justs makes the minimal change to avoid the crash and avoid mangling
__unaligned, as it currently happens with non-member functions.
Differential Revision: https://reviews.llvm.org/D31976
llvm-svn: 300686
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit teaches Clang to recognize editor placeholders that are produced
when an IDE like Xcode inserts a code-completion result that includes a
placeholder. Now when the lexer sees a placeholder token, it emits an
'editor placeholder in source file' error and creates an identifier token
that represents the placeholder. The parser/sema can now recognize the
placeholders and can suppress the diagnostics related to the placeholders. This
ensures that live issues in an IDE like Xcode won't get spurious diagnostics
related to placeholders.
This commit also adds a new compiler option named '-fallow-editor-placeholders'
that silences the 'editor placeholder in source file' error. This is useful
for an IDE like Xcode as we don't want to display those errors in live issues.
rdar://31581400
Differential Revision: https://reviews.llvm.org/D32081
llvm-svn: 300667
|
| |
|
|
|
|
|
| |
No tests yet, but this will be tested by the upcoming:
https://reviews.llvm.org/D28462
llvm-svn: 300661
|
| |
|
|
|
|
|
|
|
|
| |
modules but exposes much more widespread issues. Example and more
information is on the review thread for r300650.
Original commit summary:
[modules] Properly look up the owning module for an instantiation of a merged template.
llvm-svn: 300659
|
| |
|
|
| |
llvm-svn: 300658
|
| |
|
|
| |
llvm-svn: 300653
|
| |
|
|
|
|
|
|
|
|
|
|
| |
merged template.
When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.
llvm-svn: 300650
|
| |
|
|
| |
llvm-svn: 300628
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The driver needs to know whether it's building a module interface or
implementation unit because it affects which outputs it produces and how it
builds the command pipeline. But the frontend doesn't need to know and should
not care: all it needs to know is what action it is being asked to perform on
the input.
(This is in preparation for permitting -emit-obj to be used on a module
interface unit to produce object code without going via a "full" PCM file.)
llvm-svn: 300611
|
| |
|
|
|
|
| |
comments if trigraphs are disabled in the current language.
llvm-svn: 300609
|
| |
|
|
|
|
| |
Patch by Yuka Takahashi (D32119)!
llvm-svn: 300594
|
| |
|
|
|
|
|
|
|
|
|
| |
UBSAN 'invalid value' failures
The commit r300556 introduced a UBSAN issue that was caught by
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap. The DenseMap
failed to create an empty/tombstone value as the empty/tombstone values for the
SubjectMatchRule enum were not valid enum constants.
llvm-svn: 300591
|
| |
|
|
|
|
|
|
|
|
|
| |
- To be consistent with the rest of the intrinsics headers, I removed the tags <i> .. </i> for marking instruction names in italics in in smmintrin.h.
- Formatting changes to fit into 80 characters.
I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream.
llvm-svn: 300578
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Result variable is unused both in Sema::CheckARMBuiltinFunctionCall
and Sema::CheckAArch64BuiltinFunctionCall, remove it.
Patch by Wei-Ren Chen!
Reviewers: craig.topper, rnk
Reviewed By: rnk
Subscribers: aemerson, cfe-commits, rengolin
Differential Revision: https://reviews.llvm.org/D32014
llvm-svn: 300572
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Pass Cpu/Arch options to assembler for AArch64 with no-integrated-as.
This fixes PR20019.
Reviewers: richard.barton.arm, kristof.beyls, rengolin
Reviewed By: rengolin
Subscribers: srhines, pirama, aemerson, rengolin, cfe-commits
Differential Revision: https://reviews.llvm.org/D32132
llvm-svn: 300571
|
| |
|
|
| |
llvm-svn: 300560
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a recommit of r300539 that was reverted in r300543 due to test failures.
The original commit message is displayed below:
The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.
Differential Revision: https://reviews.llvm.org/D30009
llvm-svn: 300556
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Stop blindly searching for "gcc.exe" on windows.
Stop assuming "/usr" on unix, fixes cross compiling.
Reviewers: mati865, yaron.keren
Subscribers: ismail, rnk
Differential revision: https://reviews.llvm.org/D15005
llvm-svn: 300555
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This passes an option to the ARM assembly parser to emit build
attributes for the hardware selected by command line options, when
assembling an assembly file.
This is not enabled for C/C++, as this would result in duplicate build
attribute directives being emitted in each inline assembly block, when
emitting assembly.
This also adds an option to allow disabling this behaviour for assembly
files, for users who were relying on the old behaviour.
Differential revision: https://reviews.llvm.org/D31813
llvm-svn: 300550
|
| |
|
|
|
|
|
| |
This macro is defined for arm-none-eabi as of r266625, but it should also be
defined for eabihf and aarch64.
llvm-svn: 300549
|
| |
|
|
|
|
|
| |
Some tests fail on the Windows buildbots. I will have to investigate more.
This commit reverts r300539, r300540 and r300542.
llvm-svn: 300543
|
| |
|
|
|
|
| |
The warning was caused by r300539.
llvm-svn: 300542
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.
Differential Revision: https://reviews.llvm.org/D30009
llvm-svn: 300539
|
| |
|
|
|
|
| |
coroutine body
llvm-svn: 300529
|
| |
|
|
| |
llvm-svn: 300528
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get_return_object_on_allocation_failure() is present.
Summary:
This patch implements [dcl.fct.def.coroutine]p8:
> The unqualified-id get_return_object_on_allocation_failure is looked up in the scope of
> class P by class member access lookup (3.4.5). If a declaration is found, ..., and if a
> global allocation function is selected, the ::operator new(size_t, nothrow_t) form shall be used.
> [...]
> The allocation function used in this case must have a non-throwing noexcept-specification.
Reviewers: GorNishanov, rsmith, majnemer, aaron.ballman
Reviewed By: GorNishanov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31562
llvm-svn: 300524
|
| |
|
|
|
|
|
|
|
|
|
|
| |
LLVM has changed the semantics of dbg.declare for describing function
arguments. After this patch a dbg.declare always takes the *address*
of a variable as the first argument, even if the argument is not an
alloca.
https://bugs.llvm.org/show_bug.cgi?id=32382
rdar://problem/31205000
llvm-svn: 300523
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if an escaped newline was followed by a newline or a nul, we'd lex
the escaped newline as a bogus space character. This led to a bunch of
different broken corner cases:
For the pattern "\\\n\0#", we would then have a (horizontal) space whose
spelling ends in a newline, and would decide that the '#' is at the start of a
line, and incorrectly start preprocessing a directive in the middle of a
logical source line. If we were already in the middle of a directive, this
would result in our attempting to process multiple directives at the same time!
This resulted in crashes, asserts, and hangs on invalid input, as discovered by
fuzz-testing.
For the pattern "\\\n" at EOF (with an implicit following nul byte), we would
produce a bogus trailing space character with spelling "\\\n". This was mostly
harmless, but would lead to clang-format getting confused and misformatting in
rare cases. We now produce a trailing EOF token with spelling "\\\n",
consistent with our handling for other similar cases -- an escaped newline is
always part of the token containing the next character, if any.
For the pattern "\\\n\n", this was somewhat more benign, but would produce an
extraneous whitespace token to clients who care about preserving whitespace.
However, it turns out that our lexing for line comments was relying on this bug
due to an off-by-one error in its computation of the end of the comment, on the
slow path where the comment might contain escaped newlines.
llvm-svn: 300515
|
| |
|
|
|
|
|
|
|
| |
coroutine statements.
I have no idea what's happening here. The tests that fail on all of the bots
pass on my machine. Further investigation needed.
llvm-svn: 300511
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The IR builder can constant-fold null checks if the pointer operand
points to a constant. If the "is-non-null" check is folded away to
"true", don't emit the null check + branch.
Testing: check-clang, check-ubsan.
This slightly reduces the amount of null checks we emit when compiling
X86ISelLowering.cpp. Here are the numbers from patched/unpatched clangs
based on r300371.
-------------------------------------
| Setup | # of null checks |
-------------------------------------
| unpatched, -O0 | 25251 |
| patched, -O0 | 23925 | (-5.3%)
-------------------------------------
llvm-svn: 300509
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointers to the start of an alloca are non-null, so we don't need to
emit runtime null checks for them.
Testing: check-clang, check-ubsan.
This significantly reduces the amount of null checks we emit when
compiling X86ISelLowering.cpp. Here are the numbers from patched /
unpatched clangs based on r300371.
-------------------------------------
| Setup | # of null checks |
-------------------------------------
| unpatched, -O0 | 45439 |
| patched, -O0 | 25251 | (-44.4%)
-------------------------------------
llvm-svn: 300508
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Certain implicitly generated coroutine statements, such as the calls to 'return_value()' or `return_void()` or `get_return_object_on_allocation_failure()`, cannot be built until the promise type is no longer dependent. This means they are not built until after the coroutine body statement has been transformed.
This patch fixes an issue where these statements would never be built for coroutine templates.
It also fixes a small issue where diagnostics about `get_return_object_on_allocation_failure()` were incorrectly suppressed.
Reviewers: rsmith, majnemer, GorNishanov, aaron.ballman
Reviewed By: GorNishanov
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D31487
llvm-svn: 300504
|
| |
|
|
|
|
|
|
|
| |
properly replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions are not replaced. This fixes the two FIXME in SemaTemplate/friend-template.cpp."
This reverts commit r300443. Breaks compiling libc++ with modules in
some configurations.
llvm-svn: 300497
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D32133
llvm-svn: 300487
|
| |
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D31717
llvm-svn: 300485
|
| |
|
|
|
|
| |
std::function overhead, other cleanup
llvm-svn: 300461
|
| |
|
|
|
|
|
|
| |
Also, simplify code by calling MakeNaturalAlignAddrLValue.
This is a follow-up to r300396.
llvm-svn: 300454
|
| |
|
|
|
|
|
|
|
|
|
|
| |
replace a friend, and a visible friend can properly replace an invisible friend but not vice verse, and definitions are not replaced. This fixes the two FIXME in SemaTemplate/friend-template.cpp.
The code implements Richard Smith suggestion in comment 3 of the PR.
reviewer: Vassil Vassilev
Differential Revision: https://reviews.llvm.org/D31540
llvm-svn: 300443
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This diff registers isConstexpr matcher.
Test plan:
make check-all
check that "match varDecl(isConstexpr())"
works in clang-query
Differential revision: https://reviews.llvm.org/D32112
llvm-svn: 300427
|
| |
|
|
|
|
| |
UsedForHeaderGuard.
llvm-svn: 300423
|