yvesdm3000 / clanglib Goto Github PK
View Code? Open in Web Editor NEWThis project forked from alpha0010/clanglib
Code::Blocks plugin integrating various features of LLVM Clang.
This project forked from alpha0010/clanglib
Code::Blocks plugin integrating various features of LLVM Clang.
In src\clangccsettingsdlg.cpp:218 are a lot settings not saved. Is this by purpose? Why?
Reported by I_inc at http://forums.codeblocks.org/index.php/topic,20623.msg144772.html#msg144772
Code completion doesn't work for labels: no matter forward or backward referenced
Reported by I_inc:
Code completion doesn't work for fields of unions/structures inside compound literals (in C):
Code: [Select]
typedef union mystruct_t_
{
uint32_t raw;
struct
{
uint32_t offset:12;
uint32_t reserved:24;
} fields;
} mystruct_t;
uint32_t const value =
((mystruct_t) { .fields.reserved = 1 }).raw;
//CC not working here ^
I work on the codeblock code (so quite large project) on Windows and after some time i get a crash with this back trace:
#0 0x9ec4350 __cxa_throw() ([...]\output\share\CodeBlocks\plugins\clanglib.dll:??)
#1 0x9ec41c6 operator new(unsigned int) () ([...]\output\share\CodeBlocks\plugins\clanglib.dll:??)
#2 0x9fa0f58 typeinfo for std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >() ([...]\output\share\CodeBlocks\plugins\clanglib.dll:??)
#3 0x9ec82c0 std::bad_alloc::what() const() ([...]\output\share\CodeBlocks\plugins\clanglib.dll:??)
#4 0x9f5801d std::allocator_traits<std::allocator<ClAbstractToken> >::max_size(__a=...) ([tdm_gcc_4.9]include/c++/bits/alloc_traits.h:422)
#5 0x9f57ffc std::allocator_traits<std::allocator<ClAbstractToken> >::allocate(__a=..., __n=262144) ([tdm_gcc_4.9]include/c++/bits/alloc_traits.h:357)
#6 0x9f41a2d std::_Vector_base<ClAbstractToken, std::allocator<ClAbstractToken> >::_M_allocate(this=0x75119fdc, __n=262144) ([tdm_gcc_4.9]include/c++/bits/stl_vector.h:170)
#7 0x9f67dc6 std::vector<ClAbstractToken, std::allocator<ClAbstractToken> >::_M_emplace_back_aux<ClAbstractToken const&>(this=0x75119fdc) ([tdm_gcc_4.9]include/c++/bits/vector.tcc:412)
#8 0x9f6816e std::vector<ClAbstractToken, std::allocator<ClAbstractToken> >::push_back(this=0x75119fdc, __x=...) ([tdm_gcc_4.9]include/c++/bits/stl_vector.h:923)
#9 0x9eff36c ClTreeMap<ClAbstractToken>::Insert(this=0x75119fd8, key="_M_get_Tp_allocator", value=...) ([...]ClangLib/src/treemap.h:38)
#10 0x9ebaf3a ClTokenDatabase::InsertToken(this=0xa8cfdcc, token=...) ([...]ClangLib\src\tokendatabase.cpp:1070)
#11 0x9ec1b05 ClImportClangToken(cursor=..., scopeCursor=..., typ=ClTokenType_FuncRef, client_data=0xa8cfcc8) ([...]ClangLib\src\translationunit.cpp:997)
#12 0x9ec1ff5 ClAST_Visitor(cursor=..., parent=..., client_data=0xa8cfcc8) ([...]ClangLib\src\translationunit.cpp:1101)
#13 0xf9abd11 libclang!clang_isTranslationUnit() ([...]\output\libclang.dll:??)
#14 0x66 ?? () (??:??)
#15 ?? ?? () (??:??)
The ram usage of codeblocks at this moment is 1.079GByte (normally it is somewhere about 300MB)
in src/treemap.h:32
template<typename _TpVal>
class ClTreeMap
{
public:
// returns the id of the value inserted
int Insert(const std::string& key, const _TpVal& value)
{
m_Data.push_back(value);
return m_Tree.Insert(key, m_Data.size() - 1);
}
the size reported from m_Data.size() is 131072
i have no idea how to debug this error. I have also no idea if this is a memory leak or that the codebase is simply to large (but i don't think that this is the problem, because clang does not throw a badalloc )....
any hint would be appreciated
Hi, the icons of the cc list are not installed during the compiling/ installing process of the plugin.
The icons from ClangLib/images/clanglib have to be copied to $(#cb)/src/devel/share/CodeBlocks/images/clanglib
As far as i can remember the current installation process of plugins does not allow this kind of copy...
The current way how codeblocks fixes this is with the update script. This script copies the images.
I think the best way to handle this would be to distribute the images in the zip file and load them from there
greetings
When performing code completion on
MyClass::MyFunction
It has this as a result:
MyClass::MyFunction( /*! const int arg1 !*/, /*! const char* arg2 !*/ )
It should have this as a result:
MyClass::MyFunction( const int arg1, const char* arg2 )
hello,
under my linux, this plugin does not seem to recognize the #include
if i write
string a("test");
a. // here not attributes or methods are proposed.
I would like to add a indicator for active parsing at file or project level.
For example a icon in the toolbar:
Is there any api that gives me the status for the parser?
Reported by I_inc at http://forums.codeblocks.org/index.php/topic,20623.msg144772.html#msg144772
Header files are often parsed incorrectly as main files in their own translation unit. Every file in a project has a property (Properties... -> Build -> Compile file) specifying whether it is a separate translation unit. This property could be a basis for the decision. Besides it would be nice to be able to quickly switch every such header between existing translation units, in which the header file is included, through a quickly accessible menu, because it's not uncommon to have (very) different parsing of the same header depending on the translation unit.
Hi,
I have been using your plugin for a while now and I can say it works better than CodeBlocks' own CC plugin. Thanks a lot for this.
However, an annoying issue (at least for me) is the Clang's way of completing the keywords like for, while etc... The topic I came up with may be confusing so I'll provide an example. If I try to complete say 'while' I get something like:
while( /*! condition !*/ ){ }
but this is not the syntax I desire. The output I desire from Clang part is just 'while'. I use the abbreviations plugin of CB to configure the syntax for keywords and other stuff and unfortunately I am very used to pushing tab key (to code complete) after I type 'whi'. Can this behavior be optional? Or in case you don't have much time to work on it, can you at least give me a hint where on code can this behavior be disabled so I can do it on my self compiled CB? I may be able to provide a patch if I can figure it out too.
Is it also possible to make the Clang's way of function completion optional? I find it a little confusing to have the parameters as comments when the calltip shows different parameters in case there are other overloaded functions. Other than that 'tab smart jump' is a must to browse through the parameters effectively which I'm not used to.
Anyhow thanks again for the awesome plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.