[cfe-dev] Try out LLVM: no C++0x & crash

David Blaikie dblaikie at gmail.com
Wed Aug 24 07:45:55 PDT 2011


>
> > 1. Clang does not use C++0x, and there is no option to make it so, thus
> the
> > header cannot be parsed
>

I've got some experiments that could add this support - though it's a
slightly more involved problem. Clang can't parse libstdc++'s C++11 headers
- it needs libc++ for that. So you'd need the option to choose the stdlib (&
preferably have that option be forced upon you if you chose to compile as
C++11) as well as the language spec.


> > 2. It caused a crash (probably because the header could not be parsed)
>

That is a bit strange - I assume clang shouldn't be trying to continue
compiling after it finds a #error directive, but I'm not sure.

> 0.    Program arguments: /opt/clang-releases/llvm-2.7/bin/clang -cc1
>
> This would seem to imply that the version of Clang running on the
> demo page is 2.7, which had quite poor C++ support.  This was backed
> up by my own experiments in which I tried to compile the following
> (which fails to compile; enumerator_attributes was introduced between
> 2.7 and 2.9):
>
> #if !__has_feature(enumerator_attributes)
> test
> #endif
>

I don't have access to my own dev account right now so I can't verify this -
but does that successfully compile on 2.9 even without specifying a spec
version (ie: using the default -std=c++98)?


> Are we really running 2.7?  And if so, we should certainly consider
> upgrading LLVM/Clang on the demo machine.
>

I believe the intent was to upgrade to 2.9 when Tanya switched over to using
clang for the demo page a few weeks ago:
https://llvm.org/viewvc/llvm-project/www/trunk/demo/index.cgi?r1=102895&r2=136820&diff_format=h

But perhaps the machine never got the latest version rebuilt...

Which could explain why my colored clang diagnostic change never worked for
her, if clang didn't have colored diagnostic support back in 2.7 (I don't
know which revision that was - could someone confirm whether that's true?
I'll poke around in ViewVC to see if I can make sense of it, though)

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110824/642e7b15/attachment.html>


More information about the cfe-dev mailing list