[cfe-commits] r129794 - in /cfe/trunk: include/clang/AST/DeclBase.h include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/AST/DeclBase.cpp lib/Sema/Sema.cpp lib/Sema/SemaExpr.cpp lib/Sema/SemaTemplateInstantiateDe

Argyrios Kyrtzidis akyrtzi at gmail.com
Sat Apr 23 20:02:05 PDT 2011


On Apr 23, 2011, at 12:51 PM, Nico Weber wrote:

> Hi Argyrios,
> 
> this breaks the chromium webkit build. The build now complains about
> one unused function; clang didn't use to complain before. Maybe
> -Wno-unused-function should imply -Wno-unneeded-internal-declaration?

Yes, that sounds reasonable, I did it at r130080.

> 
> (It's not a big deal for us in practice – I'll add
> -Wno-unneeded-internal-declaration to our build configuration. We're
> building with -Wno-unused-function because the linker will drop unused
> functions anyway and that warning was a little too noisy. In this
> case, the new warning is also mostly noise – it's warning about a
> static function defined in a header file that gets included in a cpp
> file which uses that static function only if certain preprocessor
> defines are set. I could include the header only under these
> circumstances, but that seems like unnecessary busywork.)

Can't the static function be declared as inline static ? There will be no warning then.





More information about the cfe-commits mailing list