Move the "used but marked unused" warning behind a special warning flag for now.

llvm-svn: 117219
This commit is contained in:
Anders Carlsson 2010-10-24 04:28:00 +00:00
parent 358900d569
commit cdbd70ac69
5 changed files with 5 additions and 3 deletions

View File

@ -2039,6 +2039,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,

View File

@ -142,6 +142,7 @@ def UnusedLabel : DiagGroup<"unused-label">;
def UnusedParameter : DiagGroup<"unused-parameter">;
def UnusedValue : DiagGroup<"unused-value">;
def UnusedVariable : DiagGroup<"unused-variable">;
def UsedBytMarkedUnused : DiagGroup<"used-but-marked-unused">;
def ReadOnlySetterAttrs : DiagGroup<"readonly-setter-attrs">;
def Reorder : DiagGroup<"reorder">;
def UndeclaredSelector : DiagGroup<"undeclared-selector">;

View File

@ -109,7 +109,7 @@ def warn_unused_function : Warning<"unused function %0">,
def warn_unused_member_function : Warning<"unused member function %0">,
InGroup<UnusedMemberFunction>, DefaultIgnore;
def warn_used_but_marked_unused: Warning<"%0 was marked unused but was used">,
InGroup<Unused>;
InGroup<UsedBytMarkedUnused>, DefaultIgnore;
def warn_implicit_function_decl : Warning<
"implicit declaration of function %0">,

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -verify -Wunused -Wunused-parameter -Wunused -fsyntax-only %s
// RUN: %clang_cc1 -verify -Wunused -Wused-but-marked-unused -Wunused-parameter -Wunused -fsyntax-only %s
static void (*fp0)(void) __attribute__((unused));

View File

@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -verify %s
// RUN: %clang_cc1 -fsyntax-only -Wunused-parameter -Wused-but-marked-unused -verify %s
void f1(void) {
int x, y, z;