diff --git a/.clang-format b/.clang-format index c1f442a68..9f8b391e3 100644 --- a/.clang-format +++ b/.clang-format @@ -3,17 +3,3 @@ BasedOnStyle: Google DerivePointerAlignment: false PointerAlignment: Left SortIncludes: true - -# The following should match defaults on Windows, -# but were found to be different on Travis. - -AlignConsecutiveMacros: false -AllowAllArgumentsOnNextLine: true -AllowAllConstructorInitializersOnNextLine: true -AllowShortLambdasOnASingleLine: All -AllowShortIfStatementsOnASingleLine: WithoutElse -BraceWrapping: - AfterCaseLabel: false - SplitEmptyNamespace: true -IncludeBlocks: Regroup -SpaceAfterLogicalNot: false diff --git a/.travis.yml b/.travis.yml index 96ebf723e..0135e71c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,11 @@ addons: apt: sources: - ubuntu-toolchain-r-test - - llvm-toolchain-bionic-7 + - llvm-toolchain-9 packages: - - clang-7 - - llvm-7-dev + - clang-9 + - clang-format-9 + - llvm-9-dev - g++-8 - python3 - libc++-dev @@ -28,10 +29,10 @@ addons: matrix: include: - - env: C_COMPILER=clang-7 CXX_COMPILER=clang++-7 LINT=true + - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 LINT=true sudo: false - - env: C_COMPILER=clang-7 CXX_COMPILER=clang++-7 BUILD=true CONFIG=Debug - - env: C_COMPILER=clang-7 CXX_COMPILER=clang++-7 BUILD=true CONFIG=Release + - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Debug + - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Release git: # We handle submodules ourselves in xenia-build setup. @@ -44,6 +45,8 @@ before_script: # Dump useful info. - $CXX --version - python3 --version + - clang-format-9 --version + - clang-format-9 -style=file -dump-config # Add Vulkan dependencies. - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_$LIBVULKAN_VERSION+dfsg1-1_amd64.deb - travis_retry wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_$LIBVULKAN_VERSION+dfsg1-1_amd64.deb diff --git a/xenia-build b/xenia-build index 7c663aa35..3981555e4 100755 --- a/xenia-build +++ b/xenia-build @@ -310,7 +310,7 @@ def get_clang_format_binary(): attempts = [ 'C:\\Program Files\\LLVM\\bin\\clang-format.exe', 'C:\\Program Files (x86)\\LLVM\\bin\\clang-format.exe', - 'clang-format-3.8', + 'clang-format-9', 'clang-format', ] for binary in attempts: @@ -318,7 +318,7 @@ def get_clang_format_binary(): return binary print('ERROR: clang-format is not on PATH') print('LLVM is available from https://llvm.org/releases/download.html') - print('At least version 3.8 is required.') + print('At least version 9 is required.') print('See docs/style_guide.md for instructions on how to get it.') sys.exit(1)