Bug with clang

Eric Chamberland <[email protected]> Fri, 11 Mar 2016 19:12:42 -0500
Newsgroups gmane.comp.compilers.ccache
Organization http://www.giref.ulaval.ca
Message-ID <[email protected]>
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

_______________________________________________
ccache mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/ccache
foo.cc (text/x-c++src, 379 B)
/*!
 *****************************************************************************
 * A simple example of wring doxygen documentation that clang must warn about..
 *
 * \param pThis there is no such param... 1st warning...
 *
 * \return true there is no return value... 2nd warning
 *
 *****************************************************************************/
void foo(){}