[cfe-commits] r86233 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Sema/compare.c test/Sema/conditional-expr.c test/SemaCXX/compare.cpp test/SemaCXX/conditional-expr.cpp utils/C++Tests/LLVM-Syntax/lit.local.cfg

Douglas Gregor dgregor at apple.com
Thu Nov 5 21:24:14 PST 2009


Author: dgregor
Date: Thu Nov  5 23:24:12 2009
New Revision: 86233

URL: http://llvm.org/viewvc/llvm-project?rev=86233&view=rev
Log:
Turn off -Wsign-compare warnings by default

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Sema/compare.c
    cfe/trunk/test/Sema/conditional-expr.c
    cfe/trunk/test/SemaCXX/compare.cpp
    cfe/trunk/test/SemaCXX/conditional-expr.cpp
    cfe/trunk/utils/C++Tests/LLVM-Syntax/lit.local.cfg

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Nov  5 23:24:12 2009
@@ -70,7 +70,7 @@
 def : DiagGroup<"sequence-point">;
 def : DiagGroup<"shadow">;
 def : DiagGroup<"shorten-64-to-32">;
-def : DiagGroup<"sign-compare">;
+def SignCompare : DiagGroup<"sign-compare">;
 
 // Preprocessor warnings.
 def : DiagGroup<"builtin-macro-redefined">;
@@ -129,6 +129,7 @@
 
 
 def Extra : DiagGroup<"extra", [
+    SignCompare,
     UnusedParameter
   ]>;
 

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov  5 23:24:12 2009
@@ -1542,10 +1542,10 @@
   "statement expression not allowed at file scope">;
 def warn_mixed_sign_comparison : Warning<
   "comparison of integers of different signs: %0 and %1">,
-  InGroup<DiagGroup<"sign-compare">>;
+  InGroup<DiagGroup<"sign-compare">>, DefaultIgnore;
 def warn_mixed_sign_conditional : Warning<
   "operands of ? are integers of different signs: %0 and %1">,
-  InGroup<DiagGroup<"sign-compare">>;
+  InGroup<DiagGroup<"sign-compare">>, DefaultIgnore;
 
 def err_invalid_this_use : Error<
   "invalid use of 'this' outside of a nonstatic member function">;

Modified: cfe/trunk/test/Sema/compare.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/compare.c?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/test/Sema/compare.c (original)
+++ cfe/trunk/test/Sema/compare.c Thu Nov  5 23:24:12 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify -Wsign-compare %s
 
 int test(char *C) { // nothing here should warn.
   return C != ((void*)0);

Modified: cfe/trunk/test/Sema/conditional-expr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/conditional-expr.c?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/test/Sema/conditional-expr.c (original)
+++ cfe/trunk/test/Sema/conditional-expr.c Thu Nov  5 23:24:12 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify -pedantic %s
+// RUN: clang-cc -fsyntax-only -verify -pedantic -Wsign-compare %s
 void foo() {
   *(0 ? (double *)0 : (void *)0) = 0;
   // FIXME: GCC doesn't consider the the following two statements to be errors.

Modified: cfe/trunk/test/SemaCXX/compare.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/compare.cpp?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/compare.cpp (original)
+++ cfe/trunk/test/SemaCXX/compare.cpp Thu Nov  5 23:24:12 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -pedantic -verify %s
+// RUN: clang-cc -fsyntax-only -pedantic -verify -Wsign-compare %s
 
 int test0(long a, unsigned long b) {
   enum Enum {B};

Modified: cfe/trunk/test/SemaCXX/conditional-expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/conditional-expr.cpp?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/conditional-expr.cpp (original)
+++ cfe/trunk/test/SemaCXX/conditional-expr.cpp Thu Nov  5 23:24:12 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -fsyntax-only -verify -faccess-control -std=c++0x %s
+// RUN: clang-cc -fsyntax-only -verify -faccess-control -std=c++0x -Wsign-compare %s
 
 // C++ rules for ?: are a lot stricter than C rules, and have to take into
 // account more conversion options.

Modified: cfe/trunk/utils/C++Tests/LLVM-Syntax/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/C%2B%2BTests/LLVM-Syntax/lit.local.cfg?rev=86233&r1=86232&r2=86233&view=diff

==============================================================================
--- cfe/trunk/utils/C++Tests/LLVM-Syntax/lit.local.cfg (original)
+++ cfe/trunk/utils/C++Tests/LLVM-Syntax/lit.local.cfg Thu Nov  5 23:24:12 2009
@@ -12,7 +12,7 @@
 # testFormat: The test format to use to interpret tests.
 config.test_format = lit.formats.SyntaxCheckTest(compiler=root.clang,
                                                  dir='%s/include/llvm' % root.llvm_src_root,
-                                                 recursive=True,
+                                                 recursive=False,
                                                  pattern='^(.*\\.h|[^.]*)$',
                                                  excludes=['DAGISelHeader.h',
                                                            'AIXDataTypesFix.h',





More information about the cfe-commits mailing list