SuccessChanges

Summary

  1. Register TargetCXXABI.def as a textual header (details)
  2. [Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros (details)
  3. [clang][NFC] Change diagnostic to start with lowercase letter (details)
  4. [ADT] Use alignas + sizeof for inline storage, NFC (details)
Commit 0ff9116b36781d6fa61c25841edd53dc8f366bec by Adrian Prantl
Register TargetCXXABI.def as a textual header
The file was modifiedclang/include/clang/module.modulemap
Commit e7b4feea8e1bf520b34ad8c116abab6677344b74 by benhamilton
[Format/ObjC] Add NS_SWIFT_NAME() and CF_SWIFT_NAME() to WhitespaceSensitiveMacros

The argument passed to the preprocessor macros `NS_SWIFT_NAME(x)` and
`CF_SWIFT_NAME(x)` is stringified before passing to
`__attribute__((swift_name("x")))`.

ClangFormat didn't know about this stringification, so its custom parser
tried to parse the argument(s) passed to the macro as if they were
normal function arguments.

That means ClangFormat currently incorrectly inserts whitespace
between `NS_SWIFT_NAME` arguments with colons and dots, so:

```
extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter:MyHelper.mainWindow());
```

becomes:

```
extern UIWindow *MainWindow(void) NS_SWIFT_NAME(getter : MyHelper.mainWindow());
```

which clang treats as a parser error:

```
error: 'swift_name' attribute has invalid identifier for context name [-Werror,-Wswift-name-attribute]
```

Thankfully, D82620 recently added the ability to treat specific macros
as "whitespace sensitive", meaning their arguments are implicitly
treated as strings (so whitespace is not added anywhere inside).

This diff adds `NS_SWIFT_NAME` and `CF_SWIFT_NAME` to
`WhitespaceSensitiveMacros` so their arguments are implicitly treated
as whitespace-sensitive.

Test Plan:
  New tests added. Ran tests with:
  % ninja FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D89425
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/unittests/Format/FormatTestObjC.cpp
Commit 8487bfd4e9ae186f9f588ef989d27a96cc2438c9 by leonardchan
[clang][NFC] Change diagnostic to start with lowercase letter
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
The file was modifiedclang/test/Frontend/invalid-cxx-abi.cpp
Commit 8b6d1c0467b2dfa14cb2d2dec7637bf95c78364b by rnk
[ADT] Use alignas + sizeof for inline storage, NFC

AlignedCharArrayUnion is really only needed to handle the "union" case
when we need memory of suitable size and alignment for multiple types.
SmallVector only needs storage for one type, so use that directly.
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedclang/include/clang/AST/APValue.h
The file was modifiedllvm/include/llvm/ADT/iterator_range.h