llvm-project/clang
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
..
INPUTS
bindings/python python bindings: Add support for different kind of completion chunks 2011-02-05 17:54:10 +00:00
clang.xcodeproj In the clang.xcodeproj modify the 'clang' target to do nothing, not try to build anything. 2011-02-23 00:15:56 +00:00
docs Add __has_feature(cxx_range_for) check for C++11 range-based for loop. 2011-04-15 15:14:40 +00:00
examples Fixed build error. 2011-03-29 18:31:21 +00:00
include We regard a function as 'unused' from the codegen perspective, so our warnings diverge from 2011-04-19 19:51:10 +00:00
lib We regard a function as 'unused' from the codegen perspective, so our warnings diverge from 2011-04-19 19:51:10 +00:00
runtime Driver/Darwin: Change to use generic iOS runtime library, which we now always need. 2011-04-18 23:48:36 +00:00
test We regard a function as 'unused' from the codegen perspective, so our warnings diverge from 2011-04-19 19:51:10 +00:00
tools Add missing break statements. 2011-04-19 04:36:17 +00:00
unittests Put targets on folders, if the IDE supports the feature. 2011-02-20 22:06:44 +00:00
utils fix a bunch of comment typos found by codespell. Patch by 2011-04-15 05:22:18 +00:00
www Update www: clang now supports C++11 for-range and non-template type aliases. 2011-04-15 14:38:27 +00:00
CMakeLists.txt Reflect rename on LLVM cmake file. 2011-04-10 16:17:31 +00:00
INSTALL.txt
LICENSE.TXT
Makefile Basic: Add support for a build variable to set the repository path that goes 2011-03-31 00:32:50 +00:00
ModuleInfo.txt
NOTES.txt A Release-Asserts build is now called a Release build. 2010-07-07 07:49:17 +00:00
README.txt Fix typo (test commit) 2010-06-17 12:39:05 +00:00
TODO.txt Test commit; added blank line to TODO.txt 2011-01-04 19:19:20 +00:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:              http://clang.llvm.org/
Building and using Clang:          http://clang.llvm.org/get_started.html
Clang Static Analyzer:             http://clang-analyzer.llvm.org/
Information on the LLVM project:   http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/