forked from OSchip/llvm-project
Rename -Wunused-method -> -Wunused-member-function.
llvm-svn: 111305
This commit is contained in:
parent
5c3cea7b09
commit
beb71b315a
|
@ -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
|
||||
]>;
|
||||
|
||||
|
|
|
@ -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">,
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue