summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-02-07 19:52:04 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-02-07 19:52:04 +0000
commit2175b6a7676c8458f6e5c72e0380a0dbcb18893c (patch)
tree7c03fd5d4b3ad631aea1ffeb3247b0983c98411b /clang/test
parentb87980a04255019cbdc5c3044595bb1d6ac6e396 (diff)
downloadbcm5719-llvm-2175b6a7676c8458f6e5c72e0380a0dbcb18893c.tar.gz
bcm5719-llvm-2175b6a7676c8458f6e5c72e0380a0dbcb18893c.zip
Make one expected-diag directive match exactly one actual diagnostic.
This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/array-constraint.c2
-rw-r--r--clang/test/Sema/flexible-array-init.c2
-rw-r--r--clang/test/Sema/incomplete-decl.c2
-rw-r--r--clang/test/Sema/pointer-addition.c2
-rw-r--r--clang/test/SemaCXX/condition.cpp2
-rw-r--r--clang/test/SemaCXX/dcl_init_aggr.cpp8
-rw-r--r--clang/test/SemaCXX/dynamic-cast.cpp2
-rw-r--r--clang/test/SemaCXX/functional-cast.cpp4
-rw-r--r--clang/test/SemaCXX/namespace.cpp2
-rw-r--r--clang/test/SemaCXX/new-delete.cpp10
-rw-r--r--clang/test/SemaCXX/overload-member-call.cpp10
-rw-r--r--clang/test/SemaCXX/try-catch.cpp2
-rw-r--r--clang/test/SemaObjC/check-dup-objc-decls-1.m4
13 files changed, 26 insertions, 26 deletions
diff --git a/clang/test/Sema/array-constraint.c b/clang/test/Sema/array-constraint.c
index 69475b76f64..d35b0acdfe7 100644
--- a/clang/test/Sema/array-constraint.c
+++ b/clang/test/Sema/array-constraint.c
@@ -1,6 +1,6 @@
// RUN: clang -fsyntax-only -verify -pedantic %s
-struct s; // expected-note {{forward declaration of 'struct s'}}
+struct s; // expected-note 2 {{forward declaration of 'struct s'}}
struct s* t (struct s z[]) { // expected-error {{array has incomplete element type}}
return z;
}
diff --git a/clang/test/Sema/flexible-array-init.c b/clang/test/Sema/flexible-array-init.c
index 9ef6eb3bc00..99ef66abe99 100644
--- a/clang/test/Sema/flexible-array-init.c
+++ b/clang/test/Sema/flexible-array-init.c
@@ -12,7 +12,7 @@ void test() {
struct foo {
int x;
- int y[]; // expected-note{{initialized flexible array member 'y' is here}}
+ int y[]; // expected-note 3 {{initialized flexible array member 'y' is here}}
};
struct bar { struct foo z; };
diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c
index bd603681d64..be52cfd7075 100644
--- a/clang/test/Sema/incomplete-decl.c
+++ b/clang/test/Sema/incomplete-decl.c
@@ -1,6 +1,6 @@
// RUN: clang -fsyntax-only -verify %s
-struct foo; // expected-note {{forward declaration of 'struct foo'}}
+struct foo; // expected-note 4 {{forward declaration of 'struct foo'}}
void b; // expected-error {{variable has incomplete type 'void'}}
struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
diff --git a/clang/test/Sema/pointer-addition.c b/clang/test/Sema/pointer-addition.c
index 81a1dc06c1f..3a924b00825 100644
--- a/clang/test/Sema/pointer-addition.c
+++ b/clang/test/Sema/pointer-addition.c
@@ -1,6 +1,6 @@
// RUN: clang %s -fsyntax-only -verify -pedantic
-typedef struct S S; // expected-note{{forward declaration of 'struct S'}}
+typedef struct S S; // expected-note 3 {{forward declaration of 'struct S'}}
void a(S* b, void* c) {
void (*fp)(int) = 0;
b++; // expected-error {{arithmetic on pointer to incomplete type}}
diff --git a/clang/test/SemaCXX/condition.cpp b/clang/test/SemaCXX/condition.cpp
index eb1e095c9c7..babb8271088 100644
--- a/clang/test/SemaCXX/condition.cpp
+++ b/clang/test/SemaCXX/condition.cpp
@@ -20,7 +20,7 @@ void test() {
while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize 'x' with an rvalue of type 'int'}} expected-error {{value of type 'struct <anonymous>' is not contextually convertible to 'bool'}}
switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}}
- if (int x=0) { // expected-note {{previous definition is here}}
+ if (int x=0) { // expected-note 2 {{previous definition is here}}
int x; // expected-error {{redefinition of 'x'}}
}
else
diff --git a/clang/test/SemaCXX/dcl_init_aggr.cpp b/clang/test/SemaCXX/dcl_init_aggr.cpp
index fbe7de15639..bed526d399a 100644
--- a/clang/test/SemaCXX/dcl_init_aggr.cpp
+++ b/clang/test/SemaCXX/dcl_init_aggr.cpp
@@ -15,7 +15,7 @@ struct NonAggregate {
};
NonAggregate non_aggregate_test = { 1, 2 }; // expected-error{{initialization of non-aggregate type 'struct NonAggregate' with an initializer list}}
-NonAggregate non_aggregate_test2[2] = { { 1, 2 }, { 3, 4 } }; // expected-error{{initialization of non-aggregate type 'struct NonAggregate' with an initializer list}}
+NonAggregate non_aggregate_test2[2] = { { 1, 2 }, { 3, 4 } }; // expected-error 2 {{initialization of non-aggregate type 'struct NonAggregate' with an initializer list}}
// C++ [dcl.init.aggr]p3
@@ -40,8 +40,8 @@ char cv[4] = { 'a', 's', 'd', 'f', 0 }; // expected-error{{excess elements in ar
struct TooFew { int a; char* b; int c; };
TooFew too_few = { 1, "asdf" }; // okay
-struct NoDefaultConstructor { // expected-note{{candidate function}}
- NoDefaultConstructor(int); // expected-note{{candidate function}}
+struct NoDefaultConstructor { // expected-note 5 {{candidate function}}
+ NoDefaultConstructor(int); // expected-note 5 {{candidate function}}
};
struct TooFewError {
int a;
@@ -53,7 +53,7 @@ TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}}
TooFewError too_few_okay2[2] = { 1, 1 };
TooFewError too_few_error2[2] = { 1 }; // expected-error{{no matching constructor}}
-NoDefaultConstructor too_few_error3[3] = { }; // expected-error{{no matching constructor}}
+NoDefaultConstructor too_few_error3[3] = { }; // expected-error 3 {{no matching constructor}}
// C++ [dcl.init.aggr]p8
struct Empty { };
diff --git a/clang/test/SemaCXX/dynamic-cast.cpp b/clang/test/SemaCXX/dynamic-cast.cpp
index 654f2e41bc5..1fa8c3dc2a3 100644
--- a/clang/test/SemaCXX/dynamic-cast.cpp
+++ b/clang/test/SemaCXX/dynamic-cast.cpp
@@ -8,7 +8,7 @@ struct D : private A {};
struct E : A {};
struct F : B, E {};
-struct Incomplete; // expected-note{{forward declaration of 'struct Incomplete'}}
+struct Incomplete; // expected-note 2 {{forward declaration of 'struct Incomplete'}}
struct Poly
{
diff --git a/clang/test/SemaCXX/functional-cast.cpp b/clang/test/SemaCXX/functional-cast.cpp
index 3b65031d9c4..9db742e732f 100644
--- a/clang/test/SemaCXX/functional-cast.cpp
+++ b/clang/test/SemaCXX/functional-cast.cpp
@@ -10,8 +10,8 @@ struct InitViaConstructor {
// FIXME: error messages for implicitly-declared special member
// function candidates are very poor
-struct NoValueInit { // expected-note{{candidate function}}
- NoValueInit(int i, int j); // expected-note{{candidate function}}
+struct NoValueInit { // expected-note 2 {{candidate function}}
+ NoValueInit(int i, int j); // expected-note 2 {{candidate function}}
};
void test_cxx_functional_value_init() {
diff --git a/clang/test/SemaCXX/namespace.cpp b/clang/test/SemaCXX/namespace.cpp
index 7af25ec35f3..ea7737e8a94 100644
--- a/clang/test/SemaCXX/namespace.cpp
+++ b/clang/test/SemaCXX/namespace.cpp
@@ -1,5 +1,5 @@
// RUN: clang -fsyntax-only -verify %s
-namespace A { // expected-note {{previous definition is here}}
+namespace A { // expected-note 2 {{previous definition is here}}
int A;
void f() { A = 0; }
}
diff --git a/clang/test/SemaCXX/new-delete.cpp b/clang/test/SemaCXX/new-delete.cpp
index ce96897e1f8..5618b47f208 100644
--- a/clang/test/SemaCXX/new-delete.cpp
+++ b/clang/test/SemaCXX/new-delete.cpp
@@ -5,8 +5,8 @@
struct S // expected-note {{candidate}}
{
S(int, int, double); // expected-note {{candidate}}
- S(double, int); // expected-note {{candidate}} expected-note {{candidate}}
- S(float, int); // expected-note {{candidate}} expected-note {{candidate}}
+ S(double, int); // expected-note 2 {{candidate}}
+ S(float, int); // expected-note 2 {{candidate}}
};
struct T; // expected-note{{forward declaration of 'struct T'}}
struct U
@@ -18,9 +18,9 @@ struct V : U
{
};
-void* operator new(size_t); // expected-note {{candidate}}
-void* operator new(size_t, int*); // expected-note {{candidate}}
-void* operator new(size_t, float*); // expected-note {{candidate}}
+void* operator new(size_t); // expected-note 2 {{candidate}}
+void* operator new(size_t, int*); // expected-note 3 {{candidate}}
+void* operator new(size_t, float*); // expected-note 3 {{candidate}}
void good_news()
{
diff --git a/clang/test/SemaCXX/overload-member-call.cpp b/clang/test/SemaCXX/overload-member-call.cpp
index 8b7b148b3f8..07936e7eecc 100644
--- a/clang/test/SemaCXX/overload-member-call.cpp
+++ b/clang/test/SemaCXX/overload-member-call.cpp
@@ -1,8 +1,8 @@
// RUN: clang -fsyntax-only -verify %s
struct X {
- int& f(int) const; // expected-note{{candidate function}}
- float& f(int); // expected-note{{candidate function}}
+ int& f(int) const; // expected-note 2 {{candidate function}}
+ float& f(int); // expected-note 2 {{candidate function}}
void test_f(int x) const {
int& i = f(x);
@@ -12,9 +12,9 @@ struct X {
float& f2 = f(x);
}
- int& g(int) const; // expected-note{{candidate function}}
- float& g(int); // expected-note{{candidate function}}
- static double& g(double); // expected-note{{candidate function}}
+ int& g(int) const; // expected-note 2 {{candidate function}}
+ float& g(int); // expected-note 2 {{candidate function}}
+ static double& g(double); // expected-note 2 {{candidate function}}
void h(int);
diff --git a/clang/test/SemaCXX/try-catch.cpp b/clang/test/SemaCXX/try-catch.cpp
index 0d72f119df7..cb5d0f84548 100644
--- a/clang/test/SemaCXX/try-catch.cpp
+++ b/clang/test/SemaCXX/try-catch.cpp
@@ -1,6 +1,6 @@
// RUN: clang -fsyntax-only -verify %s
-struct A; // expected-note{{forward declaration of 'struct A'}}
+struct A; // expected-note 3 {{forward declaration of 'struct A'}}
void f()
{
diff --git a/clang/test/SemaObjC/check-dup-objc-decls-1.m b/clang/test/SemaObjC/check-dup-objc-decls-1.m
index fa9b8674be0..54988501136 100644
--- a/clang/test/SemaObjC/check-dup-objc-decls-1.m
+++ b/clang/test/SemaObjC/check-dup-objc-decls-1.m
@@ -18,13 +18,13 @@ typedef int OBJECT; // expected-note {{previous definition is here}}
@class OBJECT ; // expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
-typedef int Gorf; // expected-note {{previous definition is here}}
+typedef int Gorf; // expected-note 2 {{previous definition is here}}
@interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
void Gorf() // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
{
- int Bar, Foo, FooBar;
+ int Bar, Foo, FooBar;
}
@protocol P -im1; @end
OpenPOWER on IntegriCloud