Rename -Wunused-method -> -Wunused-member-function.

llvm-svn: 111305
This commit is contained in:
Argyrios Kyrtzidis 2010-08-17 22:06:44 +00:00
parent 5c3cea7b09
commit beb71b315a
4 changed files with 7 additions and 7 deletions

View File

@ -133,7 +133,7 @@ def UnknownAttributes : DiagGroup<"unknown-attributes">;
def UnusedArgument : DiagGroup<"unused-argument">;
def UnusedExceptionParameter : DiagGroup<"unused-exception-parameter">;
def UnusedFunction : DiagGroup<"unused-function">;
def UnusedMethod : DiagGroup<"unused-method">;
def UnusedMemberFunction : DiagGroup<"unused-member-function">;
def UnusedLabel : DiagGroup<"unused-label">;
def UnusedParameter : DiagGroup<"unused-parameter">;
def UnusedValue : DiagGroup<"unused-value">;
@ -168,7 +168,7 @@ def Conversion : DiagGroup<"conversion",
def Unused : DiagGroup<"unused",
[UnusedArgument, UnusedFunction, UnusedLabel,
// UnusedParameter, (matches GCC's behavior)
// UnusedMethod, (clean-up llvm before enabling)
// UnusedMemberFunction, (clean-up llvm before enabling)
UnusedValue, UnusedVariable]>,
DiagCategory<"Unused Entity Issue">;
@ -187,7 +187,7 @@ def Extra : DiagGroup<"extra", [
InitializerOverrides,
SemiBeforeMethodBody,
SignCompare,
UnusedMethod,
UnusedMemberFunction,
UnusedParameter
]>;

View File

@ -104,8 +104,8 @@ def warn_decl_in_param_list : Warning<
"declaration of %0 will not be visible outside of this function">;
def warn_unused_function : Warning<"unused function %0">,
InGroup<UnusedFunction>, DefaultIgnore;
def warn_unused_method : Warning<"unused method %0">,
InGroup<UnusedMethod>, DefaultIgnore;
def warn_unused_member_function : Warning<"unused member function %0">,
InGroup<UnusedMemberFunction>, DefaultIgnore;
def warn_implicit_function_decl : Warning<
"implicit declaration of function %0">,

View File

@ -377,7 +377,7 @@ void Sema::ActOnEndOfTranslationUnit() {
if (!FD->hasBody(DiagD))
DiagD = FD;
Diag(DiagD->getLocation(),
isa<CXXMethodDecl>(DiagD) ? diag::warn_unused_method
isa<CXXMethodDecl>(DiagD) ? diag::warn_unused_member_function
: diag::warn_unused_function)
<< DiagD->getDeclName();
} else {

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Wunused -Wunused-method %s
// RUN: %clang_cc1 -fsyntax-only -verify -Wunused -Wunused-member-function %s
static void f1(); // expected-warning{{unused}}