зеркало из https://github.com/microsoft/clang.git
Move the "used but marked unused" warning behind a special warning flag for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
77a1a8868e
Коммит
cd1af3d68b
|
@ -2039,6 +2039,7 @@
|
|||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
|
|
|
@ -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">;
|
||||
|
|
|
@ -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">,
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче