Turn off -Wsign-compare warnings by default
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86233 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 8cfdd40..2a998d1 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -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
]>;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index e825e6e..729395a 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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">;
diff --git a/test/Sema/compare.c b/test/Sema/compare.c
index 9cbbfba..45a100b 100644
--- a/test/Sema/compare.c
+++ b/test/Sema/compare.c
@@ -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);
diff --git a/test/Sema/conditional-expr.c b/test/Sema/conditional-expr.c
index 3bfeae5..8cac32c 100644
--- a/test/Sema/conditional-expr.c
+++ b/test/Sema/conditional-expr.c
@@ -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.
diff --git a/test/SemaCXX/compare.cpp b/test/SemaCXX/compare.cpp
index 806b078..2a29634 100644
--- a/test/SemaCXX/compare.cpp
+++ b/test/SemaCXX/compare.cpp
@@ -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};
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp
index da2dd67..f76472b 100644
--- a/test/SemaCXX/conditional-expr.cpp
+++ b/test/SemaCXX/conditional-expr.cpp
@@ -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.
diff --git a/utils/C++Tests/LLVM-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Syntax/lit.local.cfg
index 5c19c4d..90c6f33 100644
--- a/utils/C++Tests/LLVM-Syntax/lit.local.cfg
+++ b/utils/C++Tests/LLVM-Syntax/lit.local.cfg
@@ -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',