If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

But GCC likely isn't easily able to split out the code to do this from the rest of the compiler like clang can, since it wasn't designed that way from the start and the codebase is so messy.

Yeah, that's come up a few times in discussions in the past few years. GCC's an old codebase, and it doesn't have the same flexibility that LLVM/Clang's more module code has. Which means that while it remains the better of the two at being a traditional compiler, it's not much good at being repurposed - e.g having it's parser reused to provide a bit of smarts to an IDE, etc.

Leave a comment:

OK, Clang has better debugging and yadda yadda yadda... LLVM is the best thing since sliced bread, I get it.. I really get it.

so here is my proposal,

Have code compiled be at least as optimized as GNU GCC. Once you did that everyone would have EVERY compelling reason to use only Clang.
Match, or preferably exceed, GCC on every freekin` benchmark. You would think with the big Apple pockets, this would have already been the situation.

Just use clang while developing and compile the final executable with GCC, you get the best of both worlds.
clangs error messages are just so much better that I always use it.

Leave a comment:

OK, Clang has better debugging and yadda yadda yadda... LLVM is the best thing since sliced bread, I get it.. I really get it.

so here is my proposal,

Have code compiled be at least as optimized as GNU GCC. Once you did that everyone would have EVERY compelling reason to use only Clang.
Match, or preferably exceed, GCC on every freekin` benchmark. You would think with the big Apple pockets, this would have already been the situation.

Leave a comment:

Clang is based on libclang. Libclang is a library to process source code. It gives you source parsing, indexing, cross-referencing, declaration/definition lookup, refactoring, syntax highlighting, code completion. All the things to make you life easier. Now some dudes would like to have as a server.

I am wondering why the gcc crowd never thought of this. What is better to assist you in coding than a compiler?

I doubt they've never thought of it, since Intellisense and related IDE technologies are pretty old news. But GCC likely isn't easily able to split out the code to do this from the rest of the compiler like clang can, since it wasn't designed that way from the start and the codebase is so messy. I know KDevelop created their own parser rather than trying to re-use GCCs, most likely because it was going to be a lot easier to build it from scratch.

Leave a comment:

I don't get it... isn't clang just a compiler?
What's wrong with just calling it as needed?

Clang is based on libclang. Libclang is a library to process source code. It gives you source parsing, indexing, cross-referencing, declaration/definition lookup, refactoring, syntax highlighting, code completion. All the things to make you life easier. Now some dudes would like to have as a server.

I am wondering why the gcc crowd never thought of this. What is better to assist you in coding than a compiler?

Leave a comment:

The idea behind this is to support continuous incremental compilation, similar to Microsoft Intellisense, to give the programmer feedback for auto-completion (including fully-resolved types and class hierarchies, and the like) and to spot syntax errors in real-time. This will also speed debug compile and testing cycles, because most of the work will already be done and cached.

Another potential use is for static analysis on blocks of code being worked on, to spot potential problems or oversights as the code is being written.

I would also be interested in a scheme that allowed this to be used to create a build cluster, by splitting up and farming out work over a network interface to clangd.