Re: Bug with clang
Éric Chamberland <[email protected]> Fri, 11 Mar 2016 23:52:55 -0500
| Newsgroups | gmane.comp.compilers.ccache |
|---|---|
| Message-ID | <[email protected]> |
Hi,
to have documentation warnings working properly, I think it will be
necessary to add "-C" to the preprocessor directives to keep the
documentation into the preprocessed headers, so that if someone change
only the documentation of the file, ccache will see the difference into
the preprocessed file?
Can this be automatically added when clang -Wdocumentation or
-Weverything is used? Or may it be added by a ccache configuration
variable?
Thanks,
Eric
Le 16-03-11 19:12, Eric Chamberland a écrit :
> Hi,
>
> We are happy using ccache with clang but I just discovered today that
> ccache hides documentation warnings!
>
> I am using clang 3.7.1, ccache 3.2.4.
>
> /opt/clang-3.7/bin/clang++ --version
> clang version 3.7.1 (tags/RELEASE_371/final)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
>
> ccache --version
> ccache version 3.2.4
>
>
> Here is a small function file (foo.cc) with wrong doxygen documentation.
>
> If I compile directly with clang++ I have 3 warnings:
>
> ===================================================================
> /opt/clang-3.7/bin/clang++ -Weverything -c foo.cc
> foo.cc:7:5: warning: '\return' command used in a comment that is
> attached to a function returning void [-Wdocumentation]
> * \return true there is no return value... 2nd warning
> ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> foo.cc:5:11: warning: parameter 'pThis' not found in the function
> declaration [-Wdocumentation]
> * \param pThis there is no such param... 1st warning...
> ^~~~~
> foo.cc:10:6: warning: no previous prototype for function 'foo'
> [-Wmissing-prototypes]
> void foo(){}
> ^
> ===================================================================
>
> ok, so far so good...
>
>
> But if I compile it with ccache, the 2 warnings about documentation
> are disappearing:
>
> ccache /opt/clang-3.7/bin/clang++ -Weverything -c foo.cc
> foo.cc:10:6: warning: no previous prototype for function 'foo'
> [-Wmissing-prototypes]
> void foo(){}
>
> My CC* environment variables:
>
> CCACHE_SLOPPINESS=include_file_mtime
> CCACHE_DIR=/home/ccache/cmpbib/ccache
> CCACHE_CPP2=yes
> CCACHE_HARDLINK=1
> CCACHE_HASHDIR=
>
> How can I retrieve the documentation warnings with ccache? Do I do
> something wrong?
>
> Thanks,
>
> Eric
>