News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Clang CC

Started by yvesdm3000, October 02, 2015, 07:44:04 PM

Previous topic - Next topic

BlueHazzard

QuoteAny reason why you added a new target? Can't we just update the existing targets?
With this target you can't run it trough the run button. But it creates a "install able" file you can distribute. The other targets let you to run codeblocks with the plugin installed there? I did want to modify this targets, because modifying them would may be break your workflow?

yvesdm3000

Hi,

I'm fine with it if the existing targets would make the plugin. I have my own version anyway since my installation always seem to be different than the generic one anyway.

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

oBFusCATed

Quote from: BlueHazzard on January 28, 2017, 12:08:01 PM
1) The name of the binary is somehow unlucky... ClangLib sounds as it is something from clang but not a code completion plugin. I think ccClang or something like this would be a
cb_clang_complete or something in this style is event better name.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

yvesdm3000

I really haven't chosen the name, I'm finishing the plugin that Alpha started. Reality is that this plugin does more than code-completion, it also does code-analysis and has the potential to do a lot more where I simply start the next feature when the previous is finished.

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

Alpha

I probably could have done a better job choosing the name; I had not considered "lib" being in important prefix/suffix...
The intent of the name was that this plugin would also support other functionality retrievable via clang, such as true semantic highlighting, auto suggest (+/- apply) fixes for warnings and errors, refactoring, reformatting, etc.

yvesdm3000

Quote from: Alpha on January 28, 2017, 04:26:36 PM
I probably could have done a better job choosing the name; I had not considered "lib" being in important prefix/suffix...
The intent of the name was that this plugin would also support other functionality retrievable via clang, such as true semantic highlighting, auto suggest (+/- apply) fixes for warnings and errors, refactoring, reformatting, etc.

I actually haven't found reformatting functionality in libclang, only using a cmd-line tool which is not based on libclang but on the 'continuously-changing' c++ classes...  I think if it is based on an external tool, it should have its own C::B plugin.

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

oBFusCATed

Yes, clang-format doesn't require a compiler it is standalone tool or library...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

yvesdm3000

For the users of ClangCC, I just pushed a fix for an issue when a file that is not part of the project would be saved, caused a crash on ClangCC.

(on the staging branch)

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

MortenMacFly

Dear Yves,

I've tried to compile this plugin on a more recent compiler. I suggest to apply the patch that is attached to:
- get rid of the deprecated auto_ptr
- simplify the singleton pattern
- fix an compiler error in non-PCH builds due to missing #include <iostream>

The patch applies to 2 files on the staging branch only: cclogger{.h/.cpp}.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

oBFusCATed

Another note: if you're using CC_LOCKER_TRACK_TT_MTX_LOCK I guess you'll have to fix its implementation ;)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

Quote from: oBFusCATed on February 19, 2017, 08:01:54 PM
Another note: if you're using CC_LOCKER_TRACK_TT_MTX_LOCK I guess you'll have to fix its implementation ;)
We should totally remove those lockers.  :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

I've not said that. Just said that in some configurations they are broken (hint no locking is happening)!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

BlueHazzard

Hi, just i crash report i got lately very often:
codeblocks.exe caused an Access Violation at location 4309DC03 Reading from location 4309DC03.

Registers:
eax=4309dc03 ebx=00000001 ecx=28c0e370 edx=28c0e370 esi=0028bad4 edi=00000000
eip=4309dc03 esp=0028ba50 ebp=0028baec iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00210216

AddrPC   Params
4309DC03 00000001 00000001 00000001
0A92A530 28C0E370 0028BA94 0028BB30  clanglib.dll!BeginHighlightOccurrences  [cclang-plugin/src/ClangLib/src/clangrefactoring.cpp @ 227]
   225:     ClTokenPosition loc(line + 1, pos - stc->PositionFromLine(line) + 1);
   226:
>  227:     m_pClangPlugin->RequestOccurrencesOf( translId,  ed->GetFilename(), loc );
   228: }
   229:
0A92A171 0028BC4C 02EFD728 0028BC7C  clanglib.dll!OnTimer  [cclang-plugin/src/ClangLib/src/clangrefactoring.cpp @ 181]
   179:
   180:     if (evId == idHighlightTimer)
>  181:         BeginHighlightOccurrences(ed);
   182:     else
   183:         event.Skip();


i get the crashes randomly, don't know if you can do something with it...
greetings

yvesdm3000

I fixed a memory corruption crash yesterday in TreeMap::Remove() that might be the cause. Been reworking the index database lately and also built a tool that can dump the indexdb and now fixing many issues found by the tool. The goal is to depend less on libclang for things like the toolbar (scope menus) and goto-implementation and documentation-lookup. The problem with libclang is that you often need a translation unit to find various info and that takes a long time to create (essentially parsing/compiling the needed cpp file).

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

yvesdm3000

Quote from: oBFusCATed on February 19, 2017, 08:01:54 PM
Another note: if you're using CC_LOCKER_TRACK_TT_MTX_LOCK I guess you'll have to fix its implementation ;)
That's a file that I grabbed as-is from the regular CC plugin? I guess it has been updated there too?

Yves
Clang based code completion for Code::Blocks:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]