]> granicus.if.org Git - clang/commit
Keep track of when declarations are "used" according to C and
authorDouglas Gregor <dgregor@apple.com>
Fri, 19 Jun 2009 23:52:42 +0000 (23:52 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 19 Jun 2009 23:52:42 +0000 (23:52 +0000)
commite0762c92110dfdcdd207db461a4ea17afd168f1e
treeca454873887ffee6570e846ff9e56289360f18f2
parent7d5c74ecbbd8719436c071f38657bc8e97ee4a24
Keep track of when declarations are "used" according to C and
C++. This logic is required to trigger implicit instantiation of
function templates and member functions of class templates, which will
be implemented separately.

This commit includes support for -Wunused-parameter, printing warnings
for named parameters that are not used within a function/Objective-C
method/block. Fixes <rdar://problem/6505209>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73797 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/clang/AST/DeclBase.h
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Action.h
include/clang/Parse/Parser.h
lib/Frontend/PCHReaderDecl.cpp
lib/Frontend/PCHWriterDecl.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Sema/Sema.cpp
lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaOverload.cpp
test/Sema/warn-unused-parameters.c [new file with mode: 0644]
test/SemaObjC/warn-unused-parameters.m [new file with mode: 0644]