You are not logged in.
Has anyone tried gccsense? It's been around for a few months.
http://cx4a.org/software/gccsense/
I thought I would find a package in AUR, but actually, no. Any volonteer?
Offline
Why not try to make a PKGBUILD yourself?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
That looks very interesting.
Offline
Why not try to make a PKGBUILD yourself?
Correct.
Well, I'm not doing C++ right now. If I need to, I may. I'm just posting this here in case somebody else finds this interesting and wants to do it before me.
Offline
Looks cool, but requires a whole custom compiled gcc (available on their site as gcc-code-assist).
Offline
FYI I made PKGBUILDS. As it is built on gcc, I had to mess up with directories. If you have improvements to submit, they are on https://bitbucket.org/chmduquesne/archlinux-packages
Offline
I've seen this before and while it seems like a really cool idea it does has some serious downsides which were pointed out in the GCC mailing list when the developer originally floated this idea to the community, the biggest of which being that this is a separate GCC and so it would be hard to maintain with the mainline GCC, also its a little fiddily to actually use.
If you really need completion then you would be safer to go with gtags (for Vim, I haven't used Vim for ages though), CEDET (in conjunction with cscope or global) for Emacs, or *shudder* the CDT for Eclipse (the big downside here being that you need to fit everthing into an Eclipse project model and that you are using Java).
Offline
I've seen this before and while it seems like a really cool idea it does has some serious downsides which were pointed out in the GCC mailing list when the developer originally floated this idea to the community, the biggest of which being that this is a separate GCC and so it would be hard to maintain with the mainline GCC, also its a little fiddily to actually use.
Obviously, the maintainability may not be the best quality of this program. Well, anyway when it comes to C++, do not expect something simple.
If you really need completion then you would be safer to go with gtags (for Vim, I haven't used Vim for ages though), CEDET (in conjunction with cscope or global) for Emacs
None of the tools you mentionned were designed to be used with C++. They may be fine if you use if you try to complete C, but for C++ the completion will work horrible. For example, vim's omnicppcomplete is indentation-style sensitive, so either you adapt your style to get the completion to work fine (and you ask your colleagues to do the same - pretty much unfeasible), either you get something that works half of the time.
I don't think the guy had such a terrible idea: after all, the compiler is in the best program to know how to resolve types: that's its job. They are also planning such features in clang++. And anyway, the C++ language is so bloated that using informations directly from the compiler is pretty much the only way to get accurate results...
or *shudder* the CDT for Eclipse (the big downside here being that you need to fit everthing into an Eclipse project model and that you are using Java).
Don't even mention it
Offline
If someone is interested, I'm doing a vim plugin which use clang (and clang++ for C++) for completion. It's not finished but it's working well. Ask me if you want to test it
Note: you don't need any patched clang for my plugin
Offline
I am interested and I could even contribute (I've already messed up with writing omnicompletion functions for fun). Can I see the code?
Offline
Of course, you can find it here: http://dl.dropbox.com/u/3309866/clang_complete.vim
Put it on ~/.vim/plugin/
And don't forget to delete omnicppcomplete because it's conflicting with mine . Completion is done by <C-X><C-U>
Offline
Rip-Rip, thank you. That is great.
Offline
Latest version of my plugin can be found there: http://github.com/Rip-Rip/clang_complete.
Offline
Please upload it on vim.org!
Offline
Offline
clang_complete works great!
I have however two comments:
1. You use mktemp, which at least from my experience is a pain for portability. On Arch it works flawless, but e.g. on an Ubuntu 8.04 system (what I have at work), the options you use are not supported. Could this be done inside vim, without resorting to mktemp?
2. This one is more a clang++ issue: The unordererd_sets and _maps (fancy names for hash tables) header files make clang++ to fail due to variadic templates not (yet) being supported. The completions, however, are right. I disabled the check for v:shell_error in order to get them in vim, but this is of course an ugly hack. Do you have a better temporary solution or should we just wait that clang++ supports these templates?
Offline
clang_complete works great!
I have however two comments:
1. You use mktemp, which at least from my experience is a pain for portability. On Arch it works flawless, but e.g. on an Ubuntu 8.04 system (what I have at work), the options you use are not supported. Could this be done inside vim, without resorting to mktemp?
I didn't know that issue. I will try to suppress mktemp in a future version (I'm currently working on it).
Edit: I've just commited to github. I've drop the system("cat") and the system("mktemp") from the plugin.
2. This one is more a clang++ issue: The unordererd_sets and _maps (fancy names for hash tables) header files make clang++ to fail due to variadic templates not (yet) being supported. The completions, however, are right. I disabled the check for v:shell_error in order to get them in vim, but this is of course an ugly hack. Do you have a better temporary solution or should we just wait that clang++ supports these templates?
As far as I know, c++0x in clang++ is not really working, so until it is, disabling the check for v:shell_error is imho the best solution, but I'll try to find a better and more reliable solution
Last edited by Rip-Rip (2010-10-28 19:19:27)
Offline
Edit: I've just commited to github. I've drop the system("cat") and the system("mktemp") from the plugin.
Now it works unmodified on both systems, arch and ubuntu
As far as I know, c++0x in clang++ is not really working, so until it is, disabling the check for v:shell_error is imho the best solution, but I'll try to find a better and more reliable solution
I think some parts work, some not. For my code the current status is enough to provide accurate completions, as I do not use any of the fancy features. The main problem is with the libraries, I think.
Anyway, it is not worth it to spend too much effort thinking about sophisticated workarounds, as clang should support all features eventually.
Offline
I've just started using this, so far it feels like the easiest setup of any completion plugin I've seen so far.
Not to mention that so far it hasn't broken like omnicppcomplete tends to do quite frequently for me.
(This meaning clang, not gccsense)
Last edited by Zeist (2010-10-29 18:06:29)
I haven't lost my mind; I have a tape back-up somewhere.
Twitter
Offline