[cfe-dev] clang(1) 3.4 manpage documentation is sparse; need help figuring out available options in compiler

Nikola Smiljanic popizdeh at gmail.com
Fri Dec 5 04:35:57 PST 2014


I can't really comment on the man page as I don't know anything about it.
Users manual has some information about warnings
http://clang.llvm.org/docs/UsersManual.html. Also try using clang -cc1
--help.

The first step is usually to just try the gcc switch that does what you
want and see if you get an error. Clang does try to be compatible with gcc,
but this has never been (and will probably never be) 100%. Options that are
widely used are always something we're interested in implementing so please
file bugs if you think you've found something clang doesn't but should
support.

Documentation has always been lacking but has improved significantly in
recent times. This, as everything else, is thanks to many people who take
the time to do the work. Most things in Clang are "itch driven", and you
seem like you have one. We'd love to have better documentation and if you
have time to contribute, in any capacity, your patches will be very
welcome. It would also be a nice Christmas present :)

On Fri, Dec 5, 2014 at 10:24 PM, Garrett Cooper <yaneurabeya at gmail.com>
wrote:

> On Dec 5, 2014, at 2:37, Nikola Smiljanic <popizdeh at gmail.com> wrote:
>
> > I don't think so (apart from the webpages), but clang is meant to be a
> drop in replacement for gcc. Can you be a bit more specific with the issue
> you're having?
>
> Hi Nikola,
>         The problem is that as a FreeBSD/OSX end-user, have no idea what
> is and isn’t supported with clang from a command line perspective, apart
> from what’s listed in man 1 clang (which isn’t much:
> https://www.freebsd.org/cgi/man.cgi?query=clang&apropos=0&sektion=0&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html
> ). Many of the C/C++ warnings are missing from the manpage, optimization
> flags aren’t noted (-march/-mcpu, etc), etc. I realize that man 1 gcc
> consists of a lot of outdated information, but the bulk majority of the
> information is presented in man 1 gcc/man 1 g++. In my case, I was trying
> to figure out what preprocessor options are available via clang (in order
> to turn off undefined/unsupported preprocessor #defines, if such a thing
> existed), but I didn’t find anything helpful in man 1 clang and I didn’t
> have the patience to look through /usr/src/contrib/llvm for the
> command-line options to achieve what I needed. Furthermore, if there is any
> language-specific documentation, it’s not linked from within man 1 clang.
>         Documentation webpages don’t seem to elucidate me either:
> https://www.google.com/search?client=safari&rls=en&q=clang+warnings+list&ie=UTF-8&oe=UTF-8
> .
>         Other folks have complained about the lack of manpage
> documentation on StackOverflow as well:
> http://stackoverflow.com/questions/7880812/complete-list-of-clang-flags .
>         I love clang as a compiler, but I miss the documentation I had
> with gcc. If someone could fill in those blanks, I would appreciate clang a
> lot more.
> Thank you!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141205/2f4eb010/attachment.html>


More information about the cfe-dev mailing list