Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code completion using LSP and clangd
ollydbg:
FYI:
I have make a simple wiki page:
CB Clangd Client - Code::Blocks
;)
Pecan:
--- Quote from: ollydbg on January 22, 2022, 08:32:18 am ---FYI:
I have make a simple wiki page:
CB Clangd Client - Code::Blocks
;)
--- End quote ---
Thanks, Someday I'll get a chance to add more info.
ollydbg:
CB Clangd Client / Code / Commit [r32]
Please note that in this revision.
I'm using the Windows clangd_client_wx31_64.cbp
The generated dll file name is: Clangd_Client.dll
And the zip file name is: clangd_client.zip
Do you think the name should be the same? I mean to keep the case consistent.
ollydbg:
I see an alert from this code snippet, and here is the fix:
--- Code: --- clangd_client/src/LSPclient/src/client.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clangd_client/src/LSPclient/src/client.cpp b/clangd_client/src/LSPclient/src/client.cpp
index 459b809..e03730d 100644
--- a/clangd_client/src/LSPclient/src/client.cpp
+++ b/clangd_client/src/LSPclient/src/client.cpp
@@ -1073,7 +1073,7 @@ bool ProcessLanguageClient::DoValidateUTF8data(std::string& data)
std::string invStr(&data[invloc], 1);
//unsigned int invInt = (unsigned int)data[invloc];
unsigned char invChar(invStr[0]);
- wxUniChar uniChar(invChar);
+ wxUniChar uniChar((unsigned int)invChar);
// clangd response:
// {"id":"textDocument/completion","jsonrpc":"2.0","result":{
--- End code ---
When debugging, I see that the "invChar" is 161(dec), and it cause the alert from wx.
So, we have to first convert to "unsigned int".
See the document from: wxWidgets: wxUniChar Class Reference
--- Quote ---wxUniChar::wxUniChar ( unsigned char c )
Create a character from the 8-bit character value c using the current locale encoding.
--- End quote ---
Pecan:
--- Quote from: ollydbg on January 23, 2022, 12:47:55 pm ---CB Clangd Client / Code / Commit [r32]
Please note that in this revision.
I'm using the Windows clangd_client_wx31_64.cbp
The generated dll file name is: Clangd_Client.dll
And the zip file name is: clangd_client.zip
Do you think the name should be the same? I mean to keep the case consistent.
--- End quote ---
I do, but others did not. Wasn't worth quibbling about to me.
Thanks for the wxUniChar fix.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version