Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Clang based CC, new CC interface
Alpha:
--- Quote from: vali29 on May 01, 2014, 09:37:21 am ---
--- Quote from: Alpha on May 01, 2014, 12:14:30 am ---
--- Quote from: vali29 on April 27, 2014, 09:58:30 am ---I have successfully compiled the ClangLib plugin but always crash at clang_getInclusions when they start to parse the project.
--- End quote ---
Odd... Did you self-compile everything, or is this linking against a nightly?
--- End quote ---
Hi Alpha!
Compiled myself with TDM GCC 4.6.1, CB svn 9760, LLVM + Clang 3.3 and your ClangLib plugin.
On small CB projects, ex. c++ Hello World it's working but on projects with wxWidgets always crash.
Do you have a special build steps to compile LLVM with gcc on Windows?
--- End quote ---
Oh, apologies; looks like I never got back to you on this.
For Windows, I use the prebuilt LLVM/Clang (3.4), and TDM GCC 4.8.1 to compile wxWidgets and Code::Blocks.
My guess from your crash is that clang_parseTranslationUnit() is returning null (which it will do in the case of internal errors so extreme, it cannot recover), and then the null is passed to clang_getInclusions(). Most likely, this is due to a compiler flag (and not your source code itself - clang seems fairly good at handling, or gracefully backing down, on any sort of code I have sent it). Could you post your full compile command line for the project that crashes?
vwdvaan:
--- Quote from: Alpha on May 12, 2014, 09:28:00 pm ---
--- Quote from: vali29 on May 01, 2014, 09:37:21 am ---
--- Quote from: Alpha on May 01, 2014, 12:14:30 am ---
--- Quote from: vali29 on April 27, 2014, 09:58:30 am ---I have successfully compiled the ClangLib plugin but always crash at clang_getInclusions when they start to parse the project.
--- End quote ---
Odd... Did you self-compile everything, or is this linking against a nightly?
--- End quote ---
Hi Alpha!
Compiled myself with TDM GCC 4.6.1, CB svn 9760, LLVM + Clang 3.3 and your ClangLib plugin.
On small CB projects, ex. c++ Hello World it's working but on projects with wxWidgets always crash.
Do you have a special build steps to compile LLVM with gcc on Windows?
--- End quote ---
Oh, apologies; looks like I never got back to you on this.
For Windows, I use the prebuilt LLVM/Clang (3.4), and TDM GCC 4.8.1 to compile wxWidgets and Code::Blocks.
My guess from your crash is that clang_parseTranslationUnit() is returning null (which it will do in the case of internal errors so extreme, it cannot recover), and then the null is passed to clang_getInclusions(). Most likely, this is due to a compiler flag (and not your source code itself - clang seems fairly good at handling, or gracefully backing down, on any sort of code I have sent it). Could you post your full compile command line for the project that crashes?
--- End quote ---
Hi Alpha!
This is the command line for g++:
--- Code: ---g++.exe -Wextra -Wall -pg -g -pipe -Wno-attributes -Winvalid-pch -include wx_pch.h -fpermissive -finput-charset=ISO-8859-2 -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -D__WXDEBUG__ -D__USE_MALLOC -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_lib\mswud -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\include -Ie:\Dev\C-C++\CodeBlocks\DevPacks\litecms2\include -IControls -IE:\Dev\C-C++\CodeBlocks\DevPacks\nvwa\bin\Debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\nvwa -Ie:\Dev\C-C++\CodeBlocks\DevPacks\debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_dll\mswu -c E:\Dev\C-C++\Proiecte\VaanColorPicker\VCPSettings.cpp -o obj\MinGW\Debug_lcms2\VCPSettings.o
--- End code ---
Alpha:
--- Quote from: vali29 on May 12, 2014, 10:32:31 pm ---This is the command line for g++:
--- Code: ---g++.exe -Wextra -Wall -pg -g -pipe -Wno-attributes -Winvalid-pch -include wx_pch.h -fpermissive -finput-charset=ISO-8859-2 -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -D__WXDEBUG__ -D__USE_MALLOC -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_lib\mswud -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\include -Ie:\Dev\C-C++\CodeBlocks\DevPacks\litecms2\include -IControls -IE:\Dev\C-C++\CodeBlocks\DevPacks\nvwa\bin\Debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\nvwa -Ie:\Dev\C-C++\CodeBlocks\DevPacks\debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_dll\mswu -c E:\Dev\C-C++\Proiecte\VaanColorPicker\VCPSettings.cpp -o obj\MinGW\Debug_lcms2\VCPSettings.o
--- End code ---
--- End quote ---
Okay, I believe clang is choking on "-finput-charset=ISO-8859-2", could you test: disable clang plugin, remove that build flag, enable clang plugin (probably need to restart C::B).
scarphin:
The plugin looks quite effective, thnx for your work. I listed some issues/features I encountered below, some might be bugs:
1- I had to disable the CC plugin to install the Clang plugin for the first time. CB crashed the first time after loading a project (CC plugin was enabled when I copied the files). After installation I could enable CC plugin.
2- I'm getting a ~1sec delay before the 1st and 3rd characters of anything I type on my old dual core cpu, will that delay be permanent?
3- The '.' and '->' kicks in for almost everything like 'for./->' 'int./->' 'some_class_name./->' even when typed on their own and the list consists of almost everything too.
4- I hope the argument tip comment for functions like 'some_func(/*! argument_type !*/)' will be optional as it doesn't play nice with my color profile.
5- I see the 'for', 'while' etc... are completed into complete blocks now and not just into keywords, is it possible to make this also optional? I use abbreviations plugin to customize these blocks.
Edit: Win7 x64
vwdvaan:
--- Quote from: Alpha on May 12, 2014, 10:58:00 pm ---
--- Quote from: vali29 on May 12, 2014, 10:32:31 pm ---This is the command line for g++:
--- Code: ---g++.exe -Wextra -Wall -pg -g -pipe -Wno-attributes -Winvalid-pch -include wx_pch.h -fpermissive -finput-charset=ISO-8859-2 -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -DWX_PRECOMP -D__WXDEBUG__ -D__USE_MALLOC -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_lib\mswud -IE:\Dev\C-C++\CodeBlocks\DevPacks\wx\include -Ie:\Dev\C-C++\CodeBlocks\DevPacks\litecms2\include -IControls -IE:\Dev\C-C++\CodeBlocks\DevPacks\nvwa\bin\Debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\nvwa -Ie:\Dev\C-C++\CodeBlocks\DevPacks\debug -Ie:\Dev\C-C++\CodeBlocks\DevPacks\wx\lib\gcc_dll\mswu -c E:\Dev\C-C++\Proiecte\VaanColorPicker\VCPSettings.cpp -o obj\MinGW\Debug_lcms2\VCPSettings.o
--- End code ---
--- End quote ---
Okay, I believe clang is choking on "-finput-charset=ISO-8859-2", could you test: disable clang plugin, remove that build flag, enable clang plugin (probably need to restart C::B).
--- End quote ---
The same crash.
I made a simple wxFrame project and after i added a button on frame and set OnClick event for button...
--- Code: ---#0 6970B665 libclang!clang_defaultCodeCompleteOptions() (E:\Dev\C-C++\CodeBlocks\libclang.dll:??)
#1 00000040 ?? () (??:??)
#2 695F749E libclang!clang_defaultCodeCompleteOptions() (E:\Dev\C-C++\CodeBlocks\libclang.dll:??)
#3 ?? ?? () (??:??)
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version