SuccessChanges

Summary

  1. Revert "Fix Windows llvm-objdump tests" (details)
  2. [Format/ObjC] Correctly handle base class with lightweight generics and protocol (details)
  3. Revert "make the AsmPrinterHandler array public" (details)
  4. [lldb] Implement ObjCExceptionThrowFrameRecognizer::GetName() (details)
  5. [objdump][macho] Check arch before formating reloc name as arm64 addend (details)
  6. PR44406: Follow behavior of array bound constant folding in more recent versions of GCC. (details)
  7. Fixed a failure when const matcher fails, added a test to catch (details)
  8. [PowerPC] Implementation of 128-bit Binary Vector Rotate builtins (details)
  9. Fix accidental use of VLAs that causes these tests to fail after Clang (details)
  10. [libomptarget] Fix copy-to motion for PTR_AND_OBJ entries where PTR is a struct member. (details)
Commit f0f3d1b1817a48daa0680324bec3c6d34e590d4a by rengolin
Revert "Fix Windows llvm-objdump tests"

It had already been fixed in a different way.
The file was modifiedllvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test
The file was modifiedllvm/test/tools/llvm-objdump/X86/source-interleave-prefix-non-windows.test
Commit 24b5266892c30e2c9cb6ea28c2631e988a5754b6 by benhamilton
[Format/ObjC] Correctly handle base class with lightweight generics and protocol

ClangFormat does not correctly handle an Objective-C interface declaration
with both lightweight generics and a protocol conformance.

This simple example:

```
@interface Foo : Bar <Baz> <Blech>

@end
```

means `Foo` extends `Bar` (a lightweight generic class whose type
parameter is `Baz`) and also conforms to the protocol `Blech`.

ClangFormat should not apply any changes to the above example, but
instead it currently formats it quite poorly:

```
@interface Foo : Bar <Baz>
<Blech>

    @end
    ```

The bug is that `UnwrappedLineParser` assumes an open-angle bracket
after a base class name is a protocol list, but it can also be a
lightweight generic specification.

This diff fixes the bug by factoring out the logic to parse
lightweight generics so it can apply both to the declared class
as well as the base class.

Test Plan: New tests added. Ran tests with:
  % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests
  Confirmed tests failed before diff and passed after diff.

Reviewed By: sammccall, MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D89496
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.h
The file was modifiedclang/unittests/Format/FormatTestObjC.cpp
Commit 4242df14708cb84b3732ba1a22fb77146833340b by vtjnash
Revert "make the AsmPrinterHandler array public"

I messed up one of the tests.
The file was modifiedllvm/lib/Target/BPF/BTFDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp
The file was modifiedllvm/unittests/CodeGen/TestAsmPrinter.h
The file was modifiedllvm/lib/CodeGen/MachineModuleInfo.cpp
The file was modifiedllvm/include/llvm/CodeGen/DebugHandlerBase.h
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinterHandler.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
Commit f16cecf3752a7c168293934d2ba6472a6b405694 by davelee.com
[lldb] Implement ObjCExceptionThrowFrameRecognizer::GetName()

Implement `GetName` for `ObjCExceptionThrowFrameRecognizer`. Otherwise, `frame recognizer list` shows "(internal)" for the name.

Differential Revision: https://reviews.llvm.org/D89589
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
Commit 109113015ebeeceec862fc53a678b3619a879ce4 by daniel_l_sanders
[objdump][macho] Check arch before formating reloc name as arm64 addend

Before formating ARM64_RELOC_ADDEND relocation target name as a hex
number, the architecture need to be checked since other architectures
can define a different relocation type with the same integer as
ARM64_RELOC_ADDEND.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D89094
The file was modifiedllvm/tools/llvm-objdump/MachODump.cpp
Commit 552c6c2328723a248c2b4d2765f75d49129dff20 by richard
PR44406: Follow behavior of array bound constant folding in more recent versions of GCC.

Old GCC used to aggressively fold VLAs to constant-bound arrays at block
scope in GNU mode. That's non-conforming, and more modern versions of
GCC only do this at file scope. Update Clang to do the same.

Also promote the warning for this from off-by-default to on-by-default
in all cases; more recent versions of GCC likewise warn on this by
default.

This is still slightly more permissive than GCC, as pointed out in
PR44406, as we still fold VLAs to constant arrays in structs, but that
seems justifiable given that we don't support VLA-in-struct (and don't
intend to ever support it), but GCC does.

Differential Revision: https://reviews.llvm.org/D89523
The file was modifiedclang/test/Sema/const-eval.c
The file was modifiedclang/test/Sema/darwin-align-cast.c
The file was modifiedclang/test/Sema/offsetof-64.c
The file was modifiedclang/test/SemaObjC/gcc-cast-ext.m
The file was modifiedclang/test/Profile/misexpect-switch-only-default-case.c
The file was modifiedclang/test/Sema/complex-int.c
The file was modifiedclang/test/CodeGen/vla.c
The file was modifiedclang/test/SemaCXX/i-c-e-cxx.cpp
The file was modifiedclang/test/Sema/builtin-assume.c
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedclang/test/Sema/struct-decl.c
The file was modifiedclang/test/SemaCXX/cxx1z-noexcept-function-type.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/Profile/misexpect-switch-nonconst.c
The file was modifiedclang/test/Profile/misexpect-switch.c
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/test/Misc/warning-flags.c
The file was modifiedclang/test/Sema/decl-in-prototype.c
The file was modifiedclang/test/Sema/const-eval-64.c
The file was modifiedclang/test/Sema/gnu-flags.c
The file was modifiedclang/test/Sema/rounding-math.c
The file was modifiedclang/test/Profile/misexpect-switch-default.c
The file was modifiedclang/test/Sema/vla.c
The file was modifiedclang/test/CXX/basic/basic.types/p10.cpp
The file was modifiedclang/test/Sema/builtins.c
The file was modifiedclang/test/SemaCXX/anonymous-struct.cpp
The file was modifiedclang/test/CXX/drs/dr3xx.cpp
The file was modifiedclang/test/Sema/i-c-e.c
The file was modifiedclang/test/PCH/cxx-constexpr.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/test/SemaCXX/constant-expression.cpp
The file was modifiedclang/test/Sema/typedef-variable-type.c
Commit c096377905db8144ed310247609134783b2c9b73 by rob.suderman
Fixed a failure when const matcher fails, added a test to catch

Differential Revision: https://reviews.llvm.org/D89593
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit d30155feaa9c4ddd09cb115fb30ea5810f63af9c by conanap
[PowerPC] Implementation of 128-bit Binary Vector Rotate builtins

This patch implements 128-bit Binary Vector Rotate builtins for PowerPC10.

Differential Revision: https://reviews.llvm.org/D86819
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedclang/test/CodeGen/builtins-ppc-p10vector.c
The file was modifiedclang/include/clang/Basic/BuiltinsPPC.def
The file was modifiedclang/lib/Headers/altivec.h
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td
The file was addedllvm/test/CodeGen/PowerPC/p10-vector-rotate.ll
The file was modifiedllvm/include/llvm/IR/IntrinsicsPowerPC.td
Commit efd02c1548ee458d59063f6393e94e972b5c3d50 by richard
Fix accidental use of VLAs that causes these tests to fail after Clang
commit 552c6c2328723a248c2b4d2765f75d49129dff20.
The file was modifiedcompiler-rt/test/asan/TestCases/strncasecmp_strict.c
The file was modifiedcompiler-rt/test/asan/TestCases/strncmp_strict.c
Commit 5adb3a6d86eecade2cb94b1a04d35e673d4e5866 by georgios.rokos
[libomptarget] Fix copy-to motion for PTR_AND_OBJ entries where PTR is a struct member.

This patch fixes a problem whereby the pointee object of a PTR_AND_OBJ entry with a `map(to)` motion clause can be overwritten on the device even if its reference counter is >=1.

Currently, we check the reference counter of the parent struct in order to determine whether the motion clause should be respected, but since the pointee object is not part of the struct, it's got its own reference counter which should be used to enqueue the copy or discard it.

The same behavior has already been implemented in targetDataEnd (omptarget.cpp:539-540), but we somehow missed doing the same in targetDataBegin.

Differential Revision: https://reviews.llvm.org/D89597
The file was addedopenmp/libomptarget/test/mapping/ptr_and_obj_motion.c
The file was modifiedopenmp/libomptarget/src/omptarget.cpp