refactor, ci: switch clang-format to LLVM 15 (#4297)
Bump required clang-format version to 15
This commit is contained in:
parent
841419d067
commit
bf6c80ae35
|
@ -84,7 +84,10 @@ jobs:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Get Dependencies
|
- name: Get Dependencies
|
||||||
run: |
|
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
|
- name: Check for style diffs
|
||||||
id: check-for-diffs
|
id: check-for-diffs
|
||||||
working-directory: .
|
working-directory: .
|
||||||
|
|
|
@ -40,10 +40,10 @@ find_cfiles() {
|
||||||
! \( $(get_find_path_args $(trim_comments .clang-format-ignore)) \) "$@"
|
! \( $(get_find_path_args $(trim_comments .clang-format-ignore)) \) "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# We're targeting clang-format version 12 and other versions give slightly
|
# We're targeting clang-format version 15 and other versions give slightly
|
||||||
# different results, so prefer `clang-format-12` if it's installed.
|
# different results, so prefer `clang-format-15` if it's installed.
|
||||||
clang_format_exe_names=(
|
clang_format_exe_names=(
|
||||||
'clang-format-12'
|
'clang-format-15'
|
||||||
'clang-format'
|
'clang-format'
|
||||||
)
|
)
|
||||||
for name in ${clang_format_exe_names[@]}; do
|
for name in ${clang_format_exe_names[@]}; do
|
||||||
|
|
|
@ -55,7 +55,7 @@ static void tr_variant_string_clear(struct tr_variant_string* str)
|
||||||
{
|
{
|
||||||
if (str->type == TR_STRING_TYPE_HEAP)
|
if (str->type == TR_STRING_TYPE_HEAP)
|
||||||
{
|
{
|
||||||
delete[]((char*)(str->str.str));
|
delete[] ((char*)(str->str.str));
|
||||||
}
|
}
|
||||||
|
|
||||||
*str = StringInit;
|
*str = StringInit;
|
||||||
|
|
|
@ -98,8 +98,7 @@
|
||||||
|
|
||||||
// Logical OR these values into the u_int that you pass in the -addPath:notifyingAbout: method
|
// 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.
|
// 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.
|
VDKQueueNotifyAboutRename = NOTE_RENAME, ///< Item was renamed.
|
||||||
VDKQueueNotifyAboutWrite = NOTE_WRITE, ///< Item contents changed (also folder contents changed).
|
VDKQueueNotifyAboutWrite = NOTE_WRITE, ///< Item contents changed (also folder contents changed).
|
||||||
VDKQueueNotifyAboutDelete = NOTE_DELETE, ///< Item was removed.
|
VDKQueueNotifyAboutDelete = NOTE_DELETE, ///< Item was removed.
|
||||||
|
|
Loading…
Reference in New Issue