Giter Club home page Giter Club logo

clanglib's People

Contributors

alpha0010 avatar enterthenamehere avatar progmboy avatar stahta01 avatar yvesdm3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clanglib's Issues

bad_alloc exception (memory overflow?)

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

icons of the cc list are not installed

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

string class is not recognized

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.

Add indicator if parser/indexer is still working

I would like to add a indicator for active parsing at file or project level.
For example a icon in the toolbar:

  • Black -> No information available
  • Red -> Parsing started
  • Yellow -> Information partially available (for ex for this file)
  • Green -> parser finished

Is there any api that gives me the status for the parser?

Header files are parsed incorrectly as main files

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.

Feature request: Make Clang syntax for keyword code completion optional

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.