|
|
Subscribe / Log in / New account

Emacs and clang?

Emacs and clang?

Posted Feb 6, 2014 2:22 UTC (Thu) by Cyberax (✭ supporter ✭, #52523)
In reply to: Emacs and clang? by mathstuf
Parent article: GCC, LLVM, and compiler plugins

A lot of template stuff. So much of it, that they'd junked their parser in favor of clang: http://milianw.de/blog/katekdevelop-sprint-2014-let-there...


to post comments

Emacs and clang?

Posted Feb 6, 2014 2:29 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

Ah. I figured C++11 would be of some issue, but I guess vararg templates are really hairy. Also, when I used KDevelop, it was using Qt containers, so templates weren't that much of an issue. Now I do lots more with boost (qi is certainly a beast), but I'm also in Vim.

Emacs and clang?

Posted Feb 6, 2014 10:38 UTC (Thu) by javispedro (guest, #83660) [Link] (1 responses)

They are complaining it's not C++11 complete, but it seems C++03 complete to me.

I don't understand your point regarding not any of the parsers I mentioned being complete. Obviously if you want to be pedantic then no C++ parser is complete (not even clang or gcc) as neither of them can solve the halting problem. But all of the ones I mentioned are quite complete enough to perform code indexing+autocomplete+folding (and will recover from broken syntax much more nicely than clang or gcc).

They will not handle corner cases but I'm not sure if you're able to solve these using only the clang public C API. And I'm not sure if the corner cases are really worth it in the first place. Not to mention most parsers are also faster than gcc or (gasp) clang. Compare QtC's one.

Virtually the only benefit I can find to clang is that, because Mesa depends on it, it's kind of guaranteed to be present on every other GNU/Linux system.

TL;DR GNU forbidding a LLVM dep is not going to kill emacs. There's plenty of alternatives. Just Google around.

Emacs and clang?

Posted Feb 6, 2014 18:44 UTC (Thu) by nix (subscriber, #2304) [Link]

but it seems C++03 complete to me
Bet it doesn't support export (but mind you neither does anyone else bar EDG, and it's nearly useless even when it works, and it's gone from C++11).

I wonder if it gets the horrible Koenig lookup rules for dependent types in multiple namespaces right. That's a typical hell zone for C++ parsers, and assuming that KDevelop wants to know what types things are (or even if they are types rather than, say, variables) it needs to get that right...


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds