Skip to content

Commit a783751

Browse files
committed
Upgrade to clang 16.0.1
1 parent c1b41d7 commit a783751

File tree

4 files changed

+23
-49
lines changed

4 files changed

+23
-49
lines changed

build.py

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def Exit( self ):
107107
'issue tracker, including the entire output of this script (with --verbose) '
108108
'and the invocation line used to run it.' )
109109

110-
CLANGD_VERSION = '15.0.1'
110+
CLANGD_VERSION = '16.0.1'
111111
CLANGD_BINARIES_ERROR_MESSAGE = (
112112
'No prebuilt Clang {version} binaries for {platform}. '
113113
'You\'ll have to compile Clangd {version} from source '
@@ -217,10 +217,6 @@ def OnWindows():
217217
return platform.system() == 'Windows'
218218

219219

220-
def OnFreeBSD():
221-
return platform.system() == 'FreeBSD'
222-
223-
224220
def OnAArch64():
225221
return platform.machine().lower().startswith( 'aarch64' )
226222

@@ -1131,38 +1127,30 @@ def GetClangdTarget():
11311127
if OnWindows():
11321128
return [
11331129
( 'clangd-{version}-win64',
1134-
'e5da88a729d1c9d00c8a965bdbfdf081a9c7a1602d5cdf7cd75aacea72180195' ),
1130+
'a0a7b16f6f92d545c84baff5e4bdb56897e955689ffc7407c915cc9d3c69a945' ),
11351131
( 'clangd-{version}-win32',
1136-
'e5be596af3b4ab5f648e6a3b67bb60a3e97f6567d2b3c43a38f30158792e2641' ) ]
1132+
'870de4d2a45380eba7c6b6640e2cb870219dd2025ed3bcb58101fd1d17f51d75' ) ]
11371133
if OnMac():
11381134
if OnArm():
11391135
return [
11401136
( 'clangd-{version}-arm64-apple-darwin',
1141-
'7a606e37b03a795bf673116ef6c58cb888e7bd01199602bcae549c90927f124f' ) ]
1137+
'c5b0a314c00e4ce839ce1f4ee1ed46116f839949b7874affa759e10589340948' ) ]
11421138
return [
11431139
( 'clangd-{version}-x86_64-apple-darwin',
1144-
'0be7dc9042584a84524f57d62bde0ef168b3e00a02205053cfe5f73a13475c97' ) ]
1145-
# FreeBSD binaries are not yet available for clang 15.0.1
1146-
#
1147-
# if OnFreeBSD():
1148-
# return [
1149-
# ( 'clangd-{version}-amd64-unknown-freebsd13',
1150-
# '' ),
1151-
# ( 'clangd-{version}-i386-unknown-freebsd13',
1152-
# '' ) ]
1140+
'826c85889a1c288418e2c05b91e40158cde06f2e79f1e951d4983de2652a6d2c' ) ]
11531141
if OnAArch64():
11541142
return [
11551143
( 'clangd-{version}-aarch64-linux-gnu',
1156-
'2497705a703c0ed5b5ef8717e247b87d084729d6cae20176e0f4dc8e33fff24b' ) ]
1144+
'79f4a0a20342479c0e29573cf58810e0daabbf00178cf042edf6e1acb20a8602' ) ]
11571145
if OnArm():
11581146
return [
11591147
None, # First list index is for 64bit archives. ARMv7 is 32bit only.
11601148
( 'clangd-{version}-armv7a-linux-gnueabihf',
1161-
'615262e7827f0ab273445390d9a0f4d841ba7fc75326483466651a846f4f5586' ) ]
1149+
'e521f21021885aaeb94e631949db6c0a65cc9c5c9c708afe4a42a058eb91ebca' ) ]
11621150
if OnX86_64():
11631151
return [
11641152
( 'clangd-{version}-x86_64-unknown-linux-gnu',
1165-
'8bf1177483daf10012f4e98ae4a6eec4f737bd1b6c8823b3b9b4a670479fcf58' ) ]
1153+
'51e69f6f5394ed6990cd7d938c53135ef2b5f8d2da1026eb291ffb3c81968847' ) ]
11661154
raise InstallationFailed(
11671155
CLANGD_BINARIES_ERROR_MESSAGE.format( version = CLANGD_VERSION,
11681156
platform = 'this system' ) )

cpp/ycm/CMakeLists.txt

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,55 +30,41 @@ if ( USE_CLANG_COMPLETER AND
3030
NOT PATH_TO_LLVM_ROOT AND
3131
NOT EXTERNAL_LIBCLANG_PATH )
3232

33-
set( CLANG_VERSION 15.0.1 )
33+
set( CLANG_VERSION 16.0.1 )
3434

3535
if ( APPLE )
3636
if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64" )
3737
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-arm64-apple-darwin" )
3838
set( LIBCLANG_SHA256
39-
"91d0c94cea43abe36d1fc954f78bc44dc77773fdf4680dd0958f05a8c859fcae" )
39+
"3fd9230f591fc2cb081b3088d0b640b3692812adc59d03fb015441a65c68c328" )
4040
else()
4141
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-x86_64-apple-darwin" )
4242
set( LIBCLANG_SHA256
43-
"f004735cb8bfd56a8ea3c0ed21d1c8c02127ea23ce62eda38143270650a902fe" )
43+
"43f7e4e72bc1d661eb01ee61666ee3a62a97d2993586c0b98efa6f46a96e768f" )
4444
endif()
4545
elseif ( WIN32 )
4646
if( 64_BIT_PLATFORM )
4747
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-win64" )
4848
set( LIBCLANG_SHA256
49-
"6e3196a4b92b5313898e51745c51d95410efd08fb2f1fabeba7205537ef7fed8" )
49+
"06280c023ff339af29d68ea66366507607b03d01061d3d7066875b2ff4f78c29" )
5050
else()
5151
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-win32" )
5252
set( LIBCLANG_SHA256
53-
"3e0f81aeb47ad1f748abc51a5b37cdb5086a9aaac03955c1fdd0930b41887e11" )
53+
"8f424ac12623638d8f8fa5f410499fe02a4a4ea9d1e02facdc484db9f1b0f4d8" )
5454
endif()
55-
# FreeBSD binaries are not yet available for llvm 15.0,1
56-
#
57-
# elseif ( SYSTEM_IS_FREEBSD )
58-
# if ( 64_BIT_PLATFORM )
59-
# set( LIBCLANG_DIRNAME
60-
# "libclang-${CLANG_VERSION}-amd64-unknown-freebsd13" )
61-
# set( LIBCLANG_SHA256
62-
# "" )
63-
# else()
64-
# set( LIBCLANG_DIRNAME
65-
# "libclang-${CLANG_VERSION}-i386-unknown-freebsd13" )
66-
# set( LIBCLANG_SHA256
67-
# "" )
68-
# endif()
6955
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)" )
7056
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-aarch64-linux-gnu" )
7157
set( LIBCLANG_SHA256
72-
"294ffae61aab3198dc26b8cb891475ab4c08ab4e20f826c687260730350a3eaf" )
58+
"518725f324e425cc3d0eafd1897cbf9cc35d9e442983b5efaa19112b73ae0ebf" )
7359
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)" )
7460
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-armv7a-linux-gnueabihf" )
7561
set( LIBCLANG_SHA256
76-
"e8ebe03b6fc558699f8ce389dd3693a9ac8cf4170b436cc0123fd923eba057d6" )
62+
"5b45929923ec241bec18b714765554eb31365c4c90bf58529555665edd79a2f1" )
7763
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64)" )
7864
set( LIBCLANG_DIRNAME
7965
"libclang-${CLANG_VERSION}-x86_64-unknown-linux-gnu" )
8066
set( LIBCLANG_SHA256
81-
"89e8fdb6e7b694226405c6c2b8f5ef26f7683b4328bca7d7e611314189a75aa9" )
67+
"e0c69d229f6dd91d0530508fa28250f658cb27d7b8825394bf539f8cc1db8c9c" )
8268
else()
8369
message( FATAL_ERROR
8470
"No prebuilt Clang ${CLANG_VERSION} binaries for this system. "

ycmd/tests/clangd/get_completions_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def test_GetCompletions_NoCompletionsWhenAutoTriggerOff( self, app ):
372372

373373

374374
@WithRetry()
375-
@SharedYcmd
375+
@IsolatedYcmd( { 'clangd_uses_ycmd_caching': 1 } )
376376
def test_GetCompletions_ForceSemantic_YcmdCache( self, app ):
377377
RunTest( app, {
378378
'description': 'completions are returned when using ycmd filtering',
@@ -397,8 +397,9 @@ def test_GetCompletions_ForceSemantic_YcmdCache( self, app ):
397397
'expect': {
398398
'response': requests.codes.ok,
399399
'data': has_entries( {
400-
'completions': contains_exactly( CompletionEntryMatcher( 'foobar' ),
401-
CompletionEntryMatcher( 'floozar' ) ),
400+
'completions': contains_exactly(
401+
CompletionEntryMatcher( 'foobar' ),
402+
CompletionEntryMatcher( 'floozar' ) ),
402403
'errors': empty()
403404
} )
404405
},
@@ -614,7 +615,7 @@ def test_GetCompletions_QuotedInclude( self, app ):
614615
'response': requests.codes.ok,
615616
'data': has_entries( {
616617
'completion_start_column': 11,
617-
'completions': contains_exactly(
618+
'completions': has_items(
618619
CompletionEntryMatcher( 'a.hpp"' ),
619620
CompletionEntryMatcher( 'b.hpp"' ),
620621
CompletionEntryMatcher( 'c.hpp"' ),

ycmd/tests/clangd/subcommands_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def FixIt_Check_MacroExpand_Resolved( results ):
522522
def FixIt_Check_AutoExpand_Resolved( results ):
523523
assert_that( results, has_entries( {
524524
'fixits': has_items( has_entries( {
525-
'text': "Expand auto type",
525+
'text': "Replace with deduced type",
526526
'chunks': contains_exactly(
527527
ChunkMatcher( 'const char *',
528528
LineColMatcher( 80, 1 ),
@@ -752,7 +752,6 @@ def test_Subcommands_GoToInclude( self, app ):
752752
{ 'req': ( 'main.cpp', 6, 11 ), 'res': ( 'system/c.hpp', 1, 1 ) },
753753
# Expected failures
754754
{ 'req': ( 'main.cpp', 7, 1 ), 'res': 'Cannot jump to location' },
755-
{ 'req': ( 'main.cpp', 10, 13 ), 'res': 'Cannot jump to location' },
756755
],
757756
[ 'GoToImprecise', 'GoToInclude', 'GoTo' ] ):
758757
with self.subTest( test = test, cmd = cmd ):
@@ -789,7 +788,7 @@ def test_Subcommands_GoToReferences( self, app ):
789788
RunGoToTest_all( app, '', 'GoToReferences', test )
790789

791790

792-
@SharedYcmd
791+
@IsolatedYcmd()
793792
def test_Subcommands_GoToSymbol( self, app ):
794793
for test in [
795794
# In same file - 1 result

0 commit comments

Comments
 (0)