Clang support
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Clang support
Hello Eran (et al?),
I was trying to set up codelite for my project, which is only compileable with clang++, c++1y mode and libc++ of clang (since the gcc libstdc still doesn’t have regex). Now I tried to set this up and failed completely.
There is no support for CMake in codelite, expect this gcc output parser, but this one doesn’t work for clang. So it’s not possible for me to use the clang autocomplete functionality. So I’m sad QtCreator does not have clang autocomplete but it works with this setup flawlessly and parses c++1y well enough to be acceptable.
Now, since I already asked once about contribution and you basically said "fix bugs", how is the development planned. Do you want to stay on the internal project file based system? I really like that QtCreator just uses CMake to see which files are in the project and basically uses CMake as its project file. Also it works with clang.
So, I have some questions:
1) In the long-term, do you want codelite to stay on this "proprietary" format for project files?
2) If you want to keep the internal project file format, do you want to support CMake somewhen as a proper alternative?
3) Maybe this is a rhetorical question, but do you want to support project which (can) only use clang++ (and c++11 or c++1y) and fully support it with clang autocomplete and the project files?
rgds, Kira
I was trying to set up codelite for my project, which is only compileable with clang++, c++1y mode and libc++ of clang (since the gcc libstdc still doesn’t have regex). Now I tried to set this up and failed completely.
There is no support for CMake in codelite, expect this gcc output parser, but this one doesn’t work for clang. So it’s not possible for me to use the clang autocomplete functionality. So I’m sad QtCreator does not have clang autocomplete but it works with this setup flawlessly and parses c++1y well enough to be acceptable.
Now, since I already asked once about contribution and you basically said "fix bugs", how is the development planned. Do you want to stay on the internal project file based system? I really like that QtCreator just uses CMake to see which files are in the project and basically uses CMake as its project file. Also it works with clang.
So, I have some questions:
1) In the long-term, do you want codelite to stay on this "proprietary" format for project files?
2) If you want to keep the internal project file format, do you want to support CMake somewhen as a proper alternative?
3) Maybe this is a rhetorical question, but do you want to support project which (can) only use clang++ (and c++11 or c++1y) and fully support it with clang autocomplete and the project files?
rgds, Kira
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Clang support
How is this related? codelite has a perfectly working clang code completionkira.backes wrote:So it’s not possible for me to use the clang autocomplete functionality
http://codelite.org/LiteEditor/ClangIntegration41
I am not sure what you are trying to say here. Does this help you: http://codelite.org/LiteEditor/CustomMakefiles ( it has a working example of how to setup cmake with codelite )kira.backes wrote:There is no support for CMake in codelite, expect this gcc output parser
I said: go over the tracker, where you can find bugs and feature requests.kira.backes wrote:you basically said "fix bugs"
To get commit rights to our git (it DavidGH as well) you need to see some persistence ( i.e. submit patches of bugs / new features with good quality over time ). This is how the open source world works
I don't see this changing in the near future. You can write a plugin that supports cmake better than the current supportkira.backes wrote:Do you want to stay on the internal project file based system?
So does codelitekira.backes wrote:Also it works with clang.
See above my answerkira.backes wrote:1) In the long-term, do you want codelite to stay on this "proprietary" format for project files?
Writing a CMake plugin should be an easy task - you wanted to help - here is your chancekira.backes wrote:2) If you want to keep the internal project file format, do you want to support CMake somewhen as a proper alternative?
I really don't understand this. To get clang code completion that project does not need to be compiled with clang. codelite can bring you both: compile with g++ and enjoy clang code completion ( codelite uses liblibclang.so for code completion )kira.backes wrote:3) Maybe this is a rhetorical question, but do you want to support project which (can) only use clang++ (and c++11 or c++1y) and fully support it with clang autocomplete and the project files?
Please read the link I pasted from the codelite's wiki
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Re: Clang support
Hello,
I think you misunderstood me. I can not compile my code with g++, I can only compile it with clang++.
Now, if you look at this link:
http://codelite.org/LiteEditor/ClangIntegration41#toc4
You can see, that I need to use codelitegcc so codelite knows how each file is compiled. But I can not use codelitegcc, since I can only compile this project with clang++. So I can’t use the clang code completion
For this to work we would probably need a "codeliteclang" which parses the clang calls...
And about the plugin, I’ll think about it.
rgds, Kira
I think you misunderstood me. I can not compile my code with g++, I can only compile it with clang++.
Now, if you look at this link:
http://codelite.org/LiteEditor/ClangIntegration41#toc4
You can see, that I need to use codelitegcc so codelite knows how each file is compiled. But I can not use codelitegcc, since I can only compile this project with clang++. So I can’t use the clang code completion
For this to work we would probably need a "codeliteclang" which parses the clang calls...
And about the plugin, I’ll think about it.
rgds, Kira
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Clang support
Use the source luke! (i.e. read codelitegcc sources)kira.backes wrote:But I can not use codelitegcc
codelitegcc is a thin wrapper that passes the information to the actual compiler (the first argument)
It is used so codelite can "copy" the compilation line and place it in a text file which is later processed by codelite ( so you will get a functional working clang code completion )
So by typing:
codelitegcc clang++ -> you are actually invoking clang++
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Re: Clang support
Sure, I tried that already, didn’t work. So I thought this doesn’t work because it is incompatible with clang++ (because clang++ has different compiler flags than g++). But if you say this is actually supposed to work, then I’ll retry iteranif wrote:codelitegcc clang++ -> you are actually invoking clang++
rgds, Kira
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Re: Clang support
Hello,
you were right, codelitegcc seems to be able to parse clang++ flags as well as g++. The problem is std::optional (in libc++) as well as boost::optional, when the header file of one of them is included the clang auto-completion breaks. So it is actually a clang (3.3?) bug
rgds, Kira
you were right, codelitegcc seems to be able to parse clang++ flags as well as g++. The problem is std::optional (in libc++) as well as boost::optional, when the header file of one of them is included the clang auto-completion breaks. So it is actually a clang (3.3?) bug
rgds, Kira
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Re: Clang support
Actually, I wasn’t talking about commit rights. Lot of projects have special pages dedicated for contribution and how-to-contribute documents, they have mailing lists and IRC channels and ways to participate in development discussion. So I was basically asking if such things are in place, because I think of those things as crucial for such a big project.eranif wrote:I said: go over the tracker, where you can find bugs and feature requests.
To get commit rights to our git (it DavidGH as well) you need to see some persistence ( i.e. submit patches of bugs / new features with good quality over time ). This is how the open source world works
rgds, Kira
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Clang support
codelitegcc parses _nothing_kira.backes wrote:codelitegcc seems to be able to parse clang++ flags as well as g++
It simply passes what _you_ placed as the flags in the project settings
Does your project compile properly?
If it does, then I would expect that the code completion will work
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Clang support
#codelite at irc.freenode.orgkira.backes wrote:they have mailing lists and IRC channels
The mailing list is less used, but it does exists: http://codelite.org -> Community
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 9
- Joined: Wed Nov 13, 2013 4:25 pm
- Genuine User: Yes
- IDE Question: C++
- Location: Germany → NRW
- Contact:
Re: Clang support
Sure it parses. Maybe I have another definition of parsing. Cmake generates the compile commands, codelitegcc parses the passed arguments, puts them into compilation.db and then calls the passed arguments in a subshell. That’s how I understand it.eranif wrote:codelitegcc parses _nothing_
It simply passes what _you_ placed as the flags in the project settings
Yes it compiles, but code completion actually fails. Believe it or not, but clang has bugs! It may well be related to the c++11 mode. You can try it yourself, activate c++11 and include <boost/optional/optional.hpp> (in linux with clang 3.3)eranif wrote:Does your project compile properly?
If it does, then I would expect that the code completion will work
rgds, Kira