refactor, ci: switch clang-format to LLVM 15 (#4297)

Bump required clang-format version to 15
This commit is contained in:
Dmitry Antipov 2022-12-02 18:57:50 +03:00 committed by GitHub
parent 841419d067
commit bf6c80ae35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View File

@ -84,7 +84,10 @@ jobs:
submodules: recursive
- name: Get Dependencies
run: |
sudo apt-get install clang-format-12 npm yarn
set -ex
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
sudo apt-get install -y clang-format-15 npm yarn
- name: Check for style diffs
id: check-for-diffs
working-directory: .

View File

@ -40,10 +40,10 @@ find_cfiles() {
! \( $(get_find_path_args $(trim_comments .clang-format-ignore)) \) "$@"
}
# We're targeting clang-format version 12 and other versions give slightly
# different results, so prefer `clang-format-12` if it's installed.
# We're targeting clang-format version 15 and other versions give slightly
# different results, so prefer `clang-format-15` if it's installed.
clang_format_exe_names=(
'clang-format-12'
'clang-format-15'
'clang-format'
)
for name in ${clang_format_exe_names[@]}; do

View File

@ -55,7 +55,7 @@ static void tr_variant_string_clear(struct tr_variant_string* str)
{
if (str->type == TR_STRING_TYPE_HEAP)
{
delete[]((char*)(str->str.str));
delete[] ((char*)(str->str.str));
}
*str = StringInit;

View File

@ -98,8 +98,7 @@
// Logical OR these values into the u_int that you pass in the -addPath:notifyingAbout: method
// to specify the types of notifications you're interested in. Pass the default value to receive all of them.
typedef NS_OPTIONS(u_int, VDKQueueNotify)
{
typedef NS_OPTIONS(u_int, VDKQueueNotify) {
VDKQueueNotifyAboutRename = NOTE_RENAME, ///< Item was renamed.
VDKQueueNotifyAboutWrite = NOTE_WRITE, ///< Item contents changed (also folder contents changed).
VDKQueueNotifyAboutDelete = NOTE_DELETE, ///< Item was removed.