llvm-project/clang/lib/Serialization
Argyrios Kyrtzidis 1618023018 We regard a function as 'unused' from the codegen perspective, so our warnings diverge from
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
2011-04-19 19:51:10 +00:00
..
ASTCommon.cpp Basic, untested implementation for an "unknown any" type requested by LLDB. 2011-04-07 08:22:57 +00:00
ASTCommon.h It's kindof silly that ExtQuals has an ASTContext&, and we can use that 2010-12-10 11:01:00 +00:00
ASTReader.cpp Support for C++11 (non-template) alias declarations. 2011-04-15 14:24:37 +00:00
ASTReaderDecl.cpp We regard a function as 'unused' from the codegen perspective, so our warnings diverge from 2011-04-19 19:51:10 +00:00
ASTReaderStmt.cpp C1X: implement generic selections 2011-04-15 00:35:48 +00:00
ASTWriter.cpp fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
ASTWriterDecl.cpp We regard a function as 'unused' from the codegen perspective, so our warnings diverge from 2011-04-19 19:51:10 +00:00
ASTWriterStmt.cpp fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
CMakeLists.txt Fix CMake build. 2011-03-09 21:12:34 +00:00
ChainedIncludesSource.cpp Make ChainedIncludesSource an ExternalSemaSource, otherwise initialization of the ASTReader is incomplete, leading to errors like not realizing std::type_info is already defined. 2011-03-31 19:29:24 +00:00
GeneratePCH.cpp Allow resolving headers from a PCH even after headers+PCH were moved to another path. 2011-02-15 17:54:22 +00:00
Makefile Reintroduce the serialization library, with fixed dependencies. 2010-08-17 20:43:28 +00:00