forked from OSchip/llvm-project
1618023018
gcc's unused warnings which don't get emitted if the function is referenced even in an unevaluated context (e.g. in templates, sizeof, etc.). Also, saying that a function is 'unused' because it won't get codegen'ed is somewhat misleading. - Don't emit 'unused' warnings for functions that are referenced in any part of the user's code. - A warning that an internal function/variable won't get emitted is useful though, so introduce -Wunneeded-internal-declaration which will warn if a function/variable with internal linkage is not "needed" ('used' from the codegen perspective), e.g: static void foo() { } template <int> void bar() { foo(); } test.cpp:1:13: warning: function 'foo' is not needed and will not be emitted static void foo() { } ^ Addresses rdar://8733476. llvm-svn: 129794 |
||
---|---|---|
.. | ||
ASTCommon.cpp | ||
ASTCommon.h | ||
ASTReader.cpp | ||
ASTReaderDecl.cpp | ||
ASTReaderStmt.cpp | ||
ASTWriter.cpp | ||
ASTWriterDecl.cpp | ||
ASTWriterStmt.cpp | ||
CMakeLists.txt | ||
ChainedIncludesSource.cpp | ||
GeneratePCH.cpp | ||
Makefile |