[mlir][SPIRV] Do not access erased op in SPIRV->LLVM lowering
This commit fixes two occurrences where an erased op was accessed at a later point of time. That won't work anymore in a One-Shot Dialect Conversion and triggers a use-after-free sanitizer error.
After the One-Shot Dialect Conversion refactoring, a `ConversionPatternRewriter` will behave more like a normal `PatternRewriter`.
[Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (#148195)
Move `RecordDecl::isInjectedClassName` to
`CXXRecordDecl::isInjectedClassName`. C language doesn't have the term
"injected class name".
Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>
Revert "[Clang] [Diagnostics] Simplify filenames that contain '..'" (#148367)
Revert llvm/llvm-project#143520 for now since it’s causing issues for
people who are using symlinks and prefer to preserve the original path
(i.e. looks like we’ll have to make this configurable after all; I just
need to figure out how to pass `-no-canonical-prefixes` down through the
driver); I’m planning to refactor this a bit and reland it in a few
days.
[ASTMatchers][NFC] Replace `makeMatcher` function with CTAD (#147197)
C++17's CTAD obsoletes `makeMatcher` (and many `make*` functions like
it).
The deduction guide is written out explicitly to avoid
`-Wctad-maybe-unsupported` warnings.
[AArch64] Fix the emission of WinCFI for pac-ret+leaf and SCS (#147518)
This commit fixes WinCFI opcodes being incorrectly emitted for test
cases in sign-return-address.ll.
Emit SEH_Nop opcode in emitShadowCallStackEpilogue the same way it is
done in emitShadowCallStackPrologue function - this fixes
12 bytes of instructions in range, but .seh directives corresponding to 8 bytes
error being reported for the epilogue of non_leaf_scs function.
Emit SEH_PrologEnd on the code path in emitPrologue function that may be
taken when pac-ret protection is emitted for a leaf function - this
fixes errors like the following:
starting epilogue (.seh_startepilogue) before prologue has ended (.seh_endprologue) in leaf_sign_all_v83
Stray .seh_endepilogue in leaf_sign_all_v83
[Test] Mark a number of libcall tests `nounwind` (#148329)
Many tests for floating point libcalls include CFI directives, which
isn't needed for the purpose of these tests. Mark some of the relevant
test functions `nounwind` in order to remove this noise.
[Support/BLAKE3] Make g_cpu_features thread safe (#147948)
`g_cpu_features` can be updated multiple times by `get_cpu_features()`,
which reports a thread sanitizer error when used with multiple lld
threads.
This PR updates BLAKE3 to v1.8.2.
[Clang] Improve diagnostics for 'placement new' with const storage argument (#144270)
Before this patch, the following code gave misleading diagnostics about
absence of `#include <new>`:
```cpp
#include <new>
struct X { int n; };
int foo() {
const X cx = {5};
// error: no matching 'operator new' function for non-allocating placement new expression; include <new>
(void)new(&cx) X{10};
};
```
Now it gives correct diagnostics about constness of passed argument:
```cpp
#include <new>
struct X { int n; };
[11 lines not shown]
[clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (#142839)
Finds function and variable declarations inside anonymous namespace and
suggests replacing them with ``static`` declarations.
The check will enforce that
[restrict-visibility](https://llvm.org/docs/CodingStandards.html#restrict-visibility)
rule in LLVM Coding Standards is followed correctly (by adding `static`
to functions instead of putting them in anonimous namespace).
The check has additional levels of "strictness" represented by Options.
By default, the check works in the most relaxed way by giving warning
only for methods and functions defined in anonymous namespaces. Also, It
finds `static` functions that are placed inside anonymous namespace -
there is no point in keeping them inside.
[clang] Don't pass sanitizers' rtlibs to linker with `-r` (#147905)
If clang is invoked with `-r` (relocatable linking) then we shouldn't
construct sanitizer arguments and then pass sanitizer runtime libs to
the linker
GCC also skips runtime linking if `-r` is also here
[RISCV] Use Predicates instead of Added Complexity to prefer QC_SELECTEQI over QC_MVEQI. NFC (#148312)
IMHO AddedComplexity should be used as a last resort. We should use
other mechanism like Predicates and PatFrag predicates to give priority.
[RISCV] Remove unneeded AddedComplexity from Xqcibi patterns. NFCI (#148301)
We don't have any tests that show why this AddedComplexity is needed.
ImmLeafs are automatically ranked higher than register operands so there
is no ambgiuity with the base ISA here.