[libc++] Don't make libc++ headers system headers in the modulemap (#205509)
We currently have `[system]` attributes in the modulemap, which
automatically makes the headers inside the module system headers. This
disables warnings when running the tests, which we generally don't want.
We also already have `#pragma GCC system_header` everywhere and use
`-isystem`, so there isn't much need for the tag in the modulemap as
well.
[libc++] Don't #define __unused with glibc in system_reserved_names.gen.py (#206971)
Newer glibc versions use the identifier `__unused`. To run the test
successufly again disable the `__unused` check with glibc.
[LoopInterchange] Add test for direction vector of `[* > =]` (NFC) (#206958)
Add a test case with a direction vector of `[* > =]`. Interchanging the
inner two loops is legal in this case, but it is currently not applied
because the definition of the "normal" form of direction vectors is not
good.
[MLIR] Prevent CF to SCF transform from erasing blocks still in use (#206310)
While merging blocks, `transformToStructuredCFBranches` may try to erase
blocks that still have uses. This may happen when the block has
self-loop or when it has 1 successor, but the successor has multiple
predecessors. This probably happens only with unreachable blocks in the
function.
Note that running a DCE pass before CF to SCF transform would remove the
triggering assert in the lit test.
Fixes #206086.
[clang] Fix code completion crash in lambda trailing requires-clause (#206373)
Fixes #201632.
This patch fixes an assertion failure when code completion is triggered
inside an ill-formed lambda's trailing requires-clause, as in
```cpp
void f() {
[]() requires x /*invoke completion here*/
```
https://godbolt.org/z/a66s7Y5cx
When `tok::code_completion` is reached, parsing is cut off before the
end of the declarator. This leaves the lambda's call operator without a
type, thus triggering the `!isNull() && "Cannot retrieve a NULL type
pointer"` assertion when `AddOrdinaryNameResults` calls
`FunctionDecl::getReturnType()` later.
Fix by guarding the `getReturnType()` call with a null check.
[6 lines not shown]
[Dexter] Add support for writing !step values (#203845)
Following from the previous patch, this patch adds support to Dexter for
generating expected values for !step nodes. This is relatively limited:
the kind of !step which this is most well-suited to this is !step
exactly, as the !step order of ignoring extra lines is redundant (all
lines are added as expected values), and !step never can't know what
lines could have been stepped on but weren't without some extra work
(e.g. finding viable breakpoint locations in the enclosing state node).
[M68k] Use getM68kMCRegisterClass accessor after MCRegisterClasses became relocation-free (#206945)
Regressed by 0b413b7d0f5a, #206753
Issue:
```
/build/source/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp: In member function 'bool
{anonymous}::M68kOperand::isPCIBD32() const':
/build/source/llvm/lib/Target/M68k/AsmParser/M68kAsmParser.cpp:516:11: error:
'M68kMCRegisterClasses' was not declared in this scope
516 | M68kMCRegisterClasses[M68k::XR32RegClassID].contains(MemOp.InnerReg));
| ^~~~~~~~~~~~~~~~~~~~~
```
[libc++] Implement LWG3662 basic_string::append/assign(NTBS, pos, n) suboptimal (#206320)
Closes https://github.com/llvm/llvm-project/issues/189809
This patch implements LWG 3662 and adds the related functional and
nonnull tests.
---------
Co-authored-by: A. Jiang <de34 at live.cn>
[DA] Update stale weak-crossing SIV FIXMEs (NFC) (#206941)
Remove outdated FIXME comments from weak-crossing SIV tests where the
expected dependence results are now documented by the CHECK lines.
Also clarify the overflow test comment and fix the described second
access from A[3*i - 2] to A[3*i + 1].
Signed-off-by: Ruoyu Qiu <cabbaken at outlook.com>
[flang][OpenACC] Accept ROUTINE directive within an interface block (#206863)
An `!$acc routine` directive placed directly within an interface block (as an
interface-specification, e.g. preceding the interface body it names) failed to
parse and produced a misleading cascade of errors.
Accept the OpenACC ROUTINE directive as an additional interface-specification
alternative, mirroring the existing extension that allows a ROUTINE directive in
a module subprogram part / at the top level. The grammar is widened narrowly to
the ROUTINE construct only (not the whole OpenACC declarative construct). A named
directive applies to the interface body it names; name resolution already runs in
a separate pass after the interface-body symbols are created, so the
directive-before-body ordering resolves correctly and the ROUTINE information is
attached to the named procedure's symbol.
This is documented as a Flang extension in OpenACC-extensions.md.
Assisted-by: AI
[Dexter] Switch to using script-mode by default
This patch changes the default mode of Dexter from heuristic-mode to
script-mode. The --use-script argument is replaced with --use-heuristic,
some comments/docs/error messages are updated accordingly, and tests have
their flags switched accordingly.
[Dexter] Allow matching lists of values for aggregate members
This patch slightly extends the matching of aggregate members to allow for
lists of expected values for individual members, functioning the same as
lists of expected values for scalar values.