[cfe-commits] r117219 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Sema/attr-unused.c test/Sema/pragma-unused.c
Anders Carlsson
andersca at mac.com
Sat Oct 23 21:28:00 PDT 2010
Author: andersca
Date: Sat Oct 23 23:28:00 2010
New Revision: 117219
URL: http://llvm.org/viewvc/llvm-project?rev=117219&view=rev
Log:
Move the "used but marked unused" warning behind a special warning flag for now.
Modified:
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/Sema/attr-unused.c
cfe/trunk/test/Sema/pragma-unused.c
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=117219&r1=117218&r2=117219&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Sat Oct 23 23:28:00 2010
@@ -2039,6 +2039,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=117219&r1=117218&r2=117219&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Sat Oct 23 23:28:00 2010
@@ -142,6 +142,7 @@
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">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=117219&r1=117218&r2=117219&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sat Oct 23 23:28:00 2010
@@ -109,7 +109,7 @@
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">,
Modified: cfe/trunk/test/Sema/attr-unused.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-unused.c?rev=117219&r1=117218&r2=117219&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-unused.c (original)
+++ cfe/trunk/test/Sema/attr-unused.c Sat Oct 23 23:28:00 2010
@@ -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));
Modified: cfe/trunk/test/Sema/pragma-unused.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/pragma-unused.c?rev=117219&r1=117218&r2=117219&view=diff
==============================================================================
--- cfe/trunk/test/Sema/pragma-unused.c (original)
+++ cfe/trunk/test/Sema/pragma-unused.c Sat Oct 23 23:28:00 2010
@@ -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;
More information about the cfe-commits
mailing list