aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-09-29 01:58:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-09-29 01:58:05 +0000
commitbe1aa410274b28fc143c47c814f07c989f4534d6 (patch)
treed4072fb4fe99287726865253e3f65492fd8d2ed1 /test
parenta5e41333b06fdf036d58495490eb14d6a0a3fcf7 (diff)
Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp2
-rw-r--r--test/Frontend/Weverything.c3
-rw-r--r--test/Frontend/warning-mapping-2.c3
-rw-r--r--test/Frontend/warning-mapping-4.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
index c38bd292ef..1041571153 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.aggr/p4.cpp
@@ -15,4 +15,4 @@ void tf() {
}
// Allowed by GNU extension
-int a4[] = {}; // expected-warning {{zero size arrays}}
+int a4[] = {}; // expected-error {{zero size arrays}}
diff --git a/test/Frontend/Weverything.c b/test/Frontend/Weverything.c
index 7c87a2cca1..32f314720b 100644
--- a/test/Frontend/Weverything.c
+++ b/test/Frontend/Weverything.c
@@ -2,9 +2,6 @@
// become errors.
//
// RUN: %clang_cc1 -verify -Weverything -pedantic-errors %s
-//
-// FIXME: This is currently broken.
-// XFAIL: *
int f0(int, unsigned);
int f0(int x, unsigned y) {
diff --git a/test/Frontend/warning-mapping-2.c b/test/Frontend/warning-mapping-2.c
index 5a347ebb09..39ba4997a4 100644
--- a/test/Frontend/warning-mapping-2.c
+++ b/test/Frontend/warning-mapping-2.c
@@ -1,8 +1,5 @@
// Check that -w has lower priority than -pedantic-errors.
// RUN: %clang_cc1 -verify -pedantic-errors -w %s
-//
-// FIXME: We currently get this wrong.
-// XFAIL: *
void f0() { f1(); } // expected-error {{implicit declaration of function}}
diff --git a/test/Frontend/warning-mapping-4.c b/test/Frontend/warning-mapping-4.c
new file mode 100644
index 0000000000..d8d2769fc5
--- /dev/null
+++ b/test/Frontend/warning-mapping-4.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -verify -Wno-error=sign-compare %s
+// RUN: %clang_cc1 -verify -Wsign-compare -w -Wno-error=sign-compare %s
+
+int f0(int x, unsigned y) {
+ return x < y;
+}