summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Parser/argument_redef.c2
-rw-r--r--clang/test/Sema/array-declared-as-incorrect-type.c6
-rw-r--r--clang/test/Sema/enum.c6
-rw-r--r--clang/test/Sema/function.c8
-rw-r--r--clang/test/Sema/implicit-decl.c2
-rw-r--r--clang/test/Sema/merge-decls.c4
-rw-r--r--clang/test/Sema/predefined-function.c8
-rw-r--r--clang/test/Sema/redefinition.c4
-rw-r--r--clang/test/Sema/struct-compat.c8
-rw-r--r--clang/test/Sema/switch-duplicate-defaults.c10
-rw-r--r--clang/test/Sema/switch.c14
-rw-r--r--clang/test/Sema/tentative-decls.c12
-rw-r--r--clang/test/Sema/typedef-redef.c2
-rw-r--r--clang/test/SemaCXX/class-names.cpp4
-rw-r--r--clang/test/SemaCXX/condition.cpp40
-rw-r--r--clang/test/SemaCXX/constructor.cpp2
-rw-r--r--clang/test/SemaCXX/conversion-function.cpp4
-rw-r--r--clang/test/SemaCXX/decl-expr-ambiguity.cpp2
-rw-r--r--clang/test/SemaCXX/default1.cpp2
-rw-r--r--clang/test/SemaCXX/destructor.cpp4
-rw-r--r--clang/test/SemaCXX/fntype-decl.cpp4
-rw-r--r--clang/test/SemaCXX/namespace.cpp18
-rw-r--r--clang/test/SemaCXX/overload-decl.cpp16
-rw-r--r--clang/test/SemaCXX/typedef-redecl.cpp6
-rw-r--r--clang/test/SemaObjC/DoubleMethod.m2
-rw-r--r--clang/test/SemaObjC/alias-test-1.m4
-rw-r--r--clang/test/SemaObjC/alias-test-2.m2
-rw-r--r--clang/test/SemaObjC/check-dup-decl-methods-1.m10
-rw-r--r--clang/test/SemaObjC/check-dup-objc-decls-1.m8
-rw-r--r--clang/test/SemaObjC/class-conforming-protocol-1.m4
-rw-r--r--clang/test/SemaObjC/class-def-test-1.m6
-rw-r--r--clang/test/SemaObjC/class-impl-1.m4
-rw-r--r--clang/test/SemaObjC/conflicting-ivar-test-1.m4
-rw-r--r--clang/test/SemaObjC/ivar-sem-check-1.m4
34 files changed, 117 insertions, 119 deletions
diff --git a/clang/test/Parser/argument_redef.c b/clang/test/Parser/argument_redef.c
index d831d48b5a1..16263f43571 100644
--- a/clang/test/Parser/argument_redef.c
+++ b/clang/test/Parser/argument_redef.c
@@ -1,6 +1,6 @@
/* RUN: clang -fsyntax-only -verify %s
*/
-int foo(int A) { /* expected-error {{previous definition is here}} */
+int foo(int A) { /* expected-note {{previous definition is here}} */
int A; /* expected-error {{redefinition of 'A'}} */
}
diff --git a/clang/test/Sema/array-declared-as-incorrect-type.c b/clang/test/Sema/array-declared-as-incorrect-type.c
index e7dd458dc0c..9b7d8b7a74e 100644
--- a/clang/test/Sema/array-declared-as-incorrect-type.c
+++ b/clang/test/Sema/array-declared-as-incorrect-type.c
@@ -3,14 +3,14 @@
extern int a1[];
int a1[1];
-extern int a2[]; // expected-error {{previous definition is here}}
+extern int a2[]; // expected-note {{previous definition is here}}
float a2[1]; // expected-error {{redefinition of 'a2'}}
extern int a3[][2];
int a3[1][2];
-extern int a4[][2]; // expected-error {{previous definition is here}}
+extern int a4[][2]; // expected-note {{previous definition is here}}
int a4[2]; // expected-error {{redefinition of 'a4'}}
-extern int a5[1][2][3]; // expected-error {{previous definition is here}}
+extern int a5[1][2][3]; // expected-note {{previous definition is here}}
int a5[3][2][1]; // expected-error {{redefinition of 'a5'}}
diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c
index ba93aaa2eec..b06882b4d34 100644
--- a/clang/test/Sema/enum.c
+++ b/clang/test/Sema/enum.c
@@ -30,8 +30,8 @@ int test2(int i)
}
// PR2020
-union u0; // expected-error {{previous use is here}}
-enum u0 { U0A }; // expected-error {{error: use of 'u0' with tag type that does not match previous declaration}}
+union u0; // expected-note {{previous use is here}}
+enum u0 { U0A }; // expected-error {{use of 'u0' with tag type that does not match previous declaration}}
// rdar://6095136
@@ -52,6 +52,6 @@ void test4() {
enum someenum {}; // expected-warning {{use of empty enum extension}}
// <rdar://problem/6093889>
-enum e0 { // expected-error {{previous definition is here}}
+enum e0 { // expected-note {{previous definition is here}}
E0 = sizeof(enum e0 { E1 }) // expected-error {{nested redefinition}}
};
diff --git a/clang/test/Sema/function.c b/clang/test/Sema/function.c
index 152205dd244..7c67bbaa633 100644
--- a/clang/test/Sema/function.c
+++ b/clang/test/Sema/function.c
@@ -6,15 +6,15 @@ void f(double (* restrict a)[5]);
int foo (__const char *__path);
int foo(__const char *__restrict __file);
-void func(const char*); //expected-error{{previous declaration is here}}
-void func(char*); //expected-error{{conflicting types for 'func'}}
+void func(const char*); // expected-note {{previous declaration is here}}
+void func(char*); // expected-error{{conflicting types for 'func'}}
void g(int (*)(const void **, const void **));
void g(int (*compar)()) {
}
-void h(); //expected-error{{previous declaration is here}}
-void h (const char *fmt, ...) {} //expected-error{{conflicting types for 'h'}}
+void h(); // expected-note {{previous declaration is here}}
+void h (const char *fmt, ...) {} // expected-error{{conflicting types for 'h'}}
// PR1965
int t5(b); // expected-error {{parameter list without types}}
diff --git a/clang/test/Sema/implicit-decl.c b/clang/test/Sema/implicit-decl.c
index ea40e61afb0..099cf9d20ea 100644
--- a/clang/test/Sema/implicit-decl.c
+++ b/clang/test/Sema/implicit-decl.c
@@ -7,7 +7,7 @@ void func() {
int32_t *vector[16];
const char compDesc[16 + 1];
int32_t compCount = 0;
- if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-error{{previous implicit declaration is here}}
+ if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}}
}
return ((void *)0);
}
diff --git a/clang/test/Sema/merge-decls.c b/clang/test/Sema/merge-decls.c
index 50ce4787699..b26532c5eac 100644
--- a/clang/test/Sema/merge-decls.c
+++ b/clang/test/Sema/merge-decls.c
@@ -3,7 +3,7 @@
void foo(void);
void foo(void) {}
void foo(void);
-void foo(void); // expected-error{{previous declaration is here}}
+void foo(void); // expected-note {{previous declaration is here}}
void foo(int); // expected-error {{conflicting types for 'foo'}}
@@ -14,6 +14,6 @@ int funcdef()
int funcdef();
-int funcdef2() { return 0; } // expected-error{{previous definition is here}}
+int funcdef2() { return 0; } // expected-note {{previous definition is here}}
int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}}
diff --git a/clang/test/Sema/predefined-function.c b/clang/test/Sema/predefined-function.c
index e8c396525d1..2a254cceb7e 100644
--- a/clang/test/Sema/predefined-function.c
+++ b/clang/test/Sema/predefined-function.c
@@ -4,7 +4,7 @@ char *funk(int format);
enum Test {A=-1};
char *funk(enum Test x);
-int eli(float b); // expected-error {{previous declaration is here}}
+int eli(float b); // expected-note {{previous declaration is here}}
int b(int c) {return 1;}
int foo();
@@ -16,7 +16,7 @@ int foo()
}
int bar();
-int bar(int i) // expected-error {{previous definition is here}}
+int bar(int i) // expected-note {{previous definition is here}}
{
return 0;
}
@@ -26,14 +26,14 @@ int bar() // expected-error {{redefinition of 'bar'}}
}
#if 0
-int foobar(int); // error {{previous declaration is here}}
+int foobar(int); // note {{previous declaration is here}}
int foobar() // error {{conflicting types for 'foobar'}}
{
return 0;
}
#endif
-int wibble(); // expected-error {{previous declaration is here}}
+int wibble(); // expected-note {{previous declaration is here}}
float wibble() // expected-error {{conflicting types for 'wibble'}}
{
return 0.0f;
diff --git a/clang/test/Sema/redefinition.c b/clang/test/Sema/redefinition.c
index c45779fdeef..9ad77f61a73 100644
--- a/clang/test/Sema/redefinition.c
+++ b/clang/test/Sema/redefinition.c
@@ -1,5 +1,5 @@
// RUN: clang %s -fsyntax-only -verify
-int f(int) { } // expected-error{{previous definition is here}}
+int f(int) { } // expected-note {{previous definition is here}}
int f(int);
-int f(int) { } // expected-error{{redefinition of 'f'}}
+int f(int) { } // expected-error {{redefinition of 'f'}}
diff --git a/clang/test/Sema/struct-compat.c b/clang/test/Sema/struct-compat.c
index a4492d12e2a..489ff471fab 100644
--- a/clang/test/Sema/struct-compat.c
+++ b/clang/test/Sema/struct-compat.c
@@ -1,17 +1,17 @@
/* RUN: clang %s -fsyntax-only -pedantic -verify
*/
-extern struct {int a;} x; // expected-error{{previous definition is here}}
-extern struct {int a;} x; // expected-error{{redefinition of 'x'}}
+extern struct {int a;} x; // expected-note {{previous definition is here}}
+extern struct {int a;} x; // expected-error {{redefinition of 'x'}}
struct x;
int a(struct x* b) {
// Per C99 6.7.2.3, since the outer and inner "struct x"es have different
// scopes, they don't refer to the same type, and are therefore incompatible
-struct x {int a;} *c = b; // expected-warning{{incompatible pointer types}}
+struct x {int a;} *c = b; // expected-warning {{incompatible pointer types}}
}
struct x {int a;} r;
int b() {
-struct x {char x;} s = r; // expected-error{{incompatible type initializing}}
+struct x {char x;} s = r; // expected-error {{incompatible type initializing}}
}
diff --git a/clang/test/Sema/switch-duplicate-defaults.c b/clang/test/Sema/switch-duplicate-defaults.c
deleted file mode 100644
index 9ef683b48b9..00000000000
--- a/clang/test/Sema/switch-duplicate-defaults.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// RUN: clang -fsyntax-only -verify %s
-
-void f (int z) {
- switch(z) {
- default: // expected-error {{first label is here}}
- default: // expected-error {{multiple default labels in one switch}}
- break;
- }
-}
-
diff --git a/clang/test/Sema/switch.c b/clang/test/Sema/switch.c
index 63e5fe33b7d..5886fefbd95 100644
--- a/clang/test/Sema/switch.c
+++ b/clang/test/Sema/switch.c
@@ -8,17 +8,17 @@ void f (int z) {
void foo(int X) {
switch (X) {
- case 42: ; // expected-error {{previous case value}}
+ case 42: ; // expected-note {{previous case}}
case 5000000000LL: // expected-warning {{overflow}}
case 42: // expected-error {{duplicate case value}}
;
case 100 ... 99: ; // expected-warning {{empty case range}}
- case 43: ; // expected-error {{previous case value}}
+ case 43: ; // expected-note {{previous case}}
case 43 ... 45: ; // expected-error {{duplicate case value}}
- case 100 ... 20000:; // expected-error {{previous case value}}
+ case 100 ... 20000:; // expected-note {{previous case}}
case 15000 ... 40000000:; // expected-error {{duplicate case value}}
}
}
@@ -60,3 +60,11 @@ void test4()
}
}
+void test5(int z) {
+ switch(z) {
+ default: // expected-note {{previous case defined here}}
+ default: // expected-error {{multiple default labels in one switch}}
+ break;
+ }
+}
+
diff --git a/clang/test/Sema/tentative-decls.c b/clang/test/Sema/tentative-decls.c
index 3a2fd5a235d..0e4b13a8434 100644
--- a/clang/test/Sema/tentative-decls.c
+++ b/clang/test/Sema/tentative-decls.c
@@ -9,12 +9,12 @@ const int b [1] = {1};
extern const int c[] = {1}; // expected-warning{{'extern' variable has an initializer}}
const int c[];
-int i1 = 1; // expected-error{{previous definition is here}}
-int i1 = 2; // expected-error{{redefinition of 'i1'}} // expected-error{{previous definition is here}}
+int i1 = 1; // expected-note {{previous definition is here}}
+int i1 = 2; // expected-error {{redefinition of 'i1'}} // expected-note {{previous definition is here}}
int i1;
int i1;
-extern int i1; // expected-error{{previous definition is here}}
-static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} expected-error{{previous definition is here}}
+extern int i1; // expected-note {{previous definition is here}}
+static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}} expected-note {{previous definition is here}}
int i1 = 3; // expected-error{{redefinition of 'i1'}} expected-error{{non-static declaration of 'i1' follows static declaration}}
__private_extern__ int pExtern;
@@ -28,11 +28,11 @@ int (*pToArray)[];
int (*pToArray)[8];
int redef[10];
-int redef[]; // expected-error{{previous definition is here}}
+int redef[]; // expected-note {{previous definition is here}}
int redef[11]; // expected-error{{redefinition of 'redef'}}
void func() {
- extern int i1; // expected-error{{previous definition is here}}
+ extern int i1; // expected-note {{previous definition is here}}
static int i1; // expected-error{{static declaration of 'i1' follows non-static declaration}}
}
diff --git a/clang/test/Sema/typedef-redef.c b/clang/test/Sema/typedef-redef.c
index d3904dd147d..76b8a3cddef 100644
--- a/clang/test/Sema/typedef-redef.c
+++ b/clang/test/Sema/typedef-redef.c
@@ -6,7 +6,7 @@ typedef __SIZE_TYPE__ size_t;
-typedef const int x; // expected-error {{previous definition is here}}
+typedef const int x; // expected-note {{previous definition is here}}
extern x a;
typedef int x; // expected-error {{typedef redefinition with different types}}
extern x a;
diff --git a/clang/test/SemaCXX/class-names.cpp b/clang/test/SemaCXX/class-names.cpp
index 22546ef3b47..8b01c89f396 100644
--- a/clang/test/SemaCXX/class-names.cpp
+++ b/clang/test/SemaCXX/class-names.cpp
@@ -5,7 +5,7 @@ C c;
void D(int);
-class D {}; // expected-error{{previous use is here}}
+class D {}; // expected-note {{previous use is here}}
void foo()
{
@@ -15,7 +15,7 @@ void foo()
class D;
-enum D; // expected-error{{use of 'D' with tag type that does not match previous declaration}}
+enum D; // expected-error {{use of 'D' with tag type that does not match previous declaration}}
class A * A;
diff --git a/clang/test/SemaCXX/condition.cpp b/clang/test/SemaCXX/condition.cpp
index f4a6debd2dd..d611364cf03 100644
--- a/clang/test/SemaCXX/condition.cpp
+++ b/clang/test/SemaCXX/condition.cpp
@@ -6,30 +6,30 @@ void test() {
if (int x=0) ++x;
typedef int arr[10];
- while (arr x=0) ; // expected-error: {{an array type is not allowed here}} expected-error: {{initialization with '{...}' expected for array}}
- while (int f()=0) ; // expected-error: {{a function type is not allowed here}}
+ while (arr x=0) ; // expected-error {{an array type is not allowed here}} expected-error {{initialization with '{...}' expected for array}}
+ while (int f()=0) ; // expected-error {{a function type is not allowed here}}
struct S {} s;
- if (s) ++x; // expected-error: {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
- while (struct S x=s) ; // expected-error: {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
- do ; while (s); // expected-error: {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
- for (;s;) ; // expected-error: {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
- switch (s) {} // expected-error: {{statement requires expression of integer type ('struct S' invalid)}}
+ if (s) ++x; // expected-error {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
+ while (struct S x=s) ; // expected-error {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
+ do ; while (s); // expected-error {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
+ for (;s;) ; // expected-error {{expression must have bool type (or be convertible to bool) ('struct S' invalid)}}
+ switch (s) {} // expected-error {{statement requires expression of integer type ('struct S' invalid)}}
- while (struct S {} x=0) ; // expected-error: {{types may not be defined in conditions}} expected-error: {{incompatible type}} expected-error: {{expression must have bool type}}
- while (struct {} x=0) ; // expected-error: {{types may not be defined in conditions}} expected-error: {{incompatible type}} expected-error: {{expression must have bool type}}
- switch (enum {E} x=0) ; // expected-error: {{types may not be defined in conditions}} expected-error: {{incompatible type}}
+ while (struct S {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}} expected-error {{expression must have bool type}}
+ while (struct {} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}} expected-error {{expression must have bool type}}
+ switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{incompatible type}}
- if (int x=0) { // expected-error: {{previous definition is here}}
- int x; // expected-error: {{redefinition of 'x'}}
+ if (int x=0) { // expected-note {{previous definition is here}}
+ int x; // expected-error {{redefinition of 'x'}}
}
else
- int x; // expected-error: {{redefinition of 'x'}}
- while (int x=0) int x; // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- while (int x=0) { int x; } // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- for (int x; int x=0; ) ; // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- for (int x; ; ) int x; // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- for (; int x=0; ) int x; // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- for (; int x=0; ) { int x; } // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
- switch (int x=0) { default: int x; } // expected-error: {{redefinition of 'x'}} expected-error: {{previous definition is here}}
+ int x; // expected-error {{redefinition of 'x'}}
+ while (int x=0) int x; // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ while (int x=0) { int x; } // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ for (int x; int x=0; ) ; // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ for (int x; ; ) int x; // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ for (; int x=0; ) int x; // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ for (; int x=0; ) { int x; } // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
+ switch (int x=0) { default: int x; } // expected-error {{redefinition of 'x'}} expected-note {{previous definition is here}}
}
diff --git a/clang/test/SemaCXX/constructor.cpp b/clang/test/SemaCXX/constructor.cpp
index 1aedb29c4e0..fc398e28ba4 100644
--- a/clang/test/SemaCXX/constructor.cpp
+++ b/clang/test/SemaCXX/constructor.cpp
@@ -5,7 +5,7 @@ typedef int INT;
class Foo {
Foo();
(Foo)(float) { }
- explicit Foo(int); // expected-error{{previous declaration is here}}
+ explicit Foo(int); // expected-note {{previous declaration is here}}
Foo(const Foo&);
((Foo))(INT); // expected-error{{cannot be redeclared}}
diff --git a/clang/test/SemaCXX/conversion-function.cpp b/clang/test/SemaCXX/conversion-function.cpp
index 3c2401f110e..17e73bce9a6 100644
--- a/clang/test/SemaCXX/conversion-function.cpp
+++ b/clang/test/SemaCXX/conversion-function.cpp
@@ -34,8 +34,8 @@ typedef int INT;
typedef INT* INT_PTR;
class Z {
- operator int(); // expected-error{{previous declaration is here}}
- operator int**(); // expected-error{{previous declaration is here}}
+ operator int(); // expected-note {{previous declaration is here}}
+ operator int**(); // expected-note {{previous declaration is here}}
operator INT(); // expected-error{{conversion function cannot be redeclared}}
operator INT_PTR*(); // expected-error{{conversion function cannot be redeclared}}
diff --git a/clang/test/SemaCXX/decl-expr-ambiguity.cpp b/clang/test/SemaCXX/decl-expr-ambiguity.cpp
index 1d690606583..7d12e22329d 100644
--- a/clang/test/SemaCXX/decl-expr-ambiguity.cpp
+++ b/clang/test/SemaCXX/decl-expr-ambiguity.cpp
@@ -23,7 +23,7 @@ void f() {
// Declarations.
int fd(T(a)); // expected-warning {{parentheses were disambiguated as a function declarator}}
- T(*d)(int(p)); // expected-warning {{parentheses were disambiguated as a function declarator}} expected-warning {{statement was disambiguated as declaration}} expected-error {{previous definition is here}}
+ T(*d)(int(p)); // expected-warning {{parentheses were disambiguated as a function declarator}} expected-warning {{statement was disambiguated as declaration}} expected-note {{previous definition is here}}
T(d)[5]; // expected-warning {{statement was disambiguated as declaration}} expected-error {{redefinition of 'd'}}
typeof(int[])(f) = { 1, 2 }; // expected-warning {{statement was disambiguated as declaration}}
void(b)(int);
diff --git a/clang/test/SemaCXX/default1.cpp b/clang/test/SemaCXX/default1.cpp
index 3acf119265c..286be6106b1 100644
--- a/clang/test/SemaCXX/default1.cpp
+++ b/clang/test/SemaCXX/default1.cpp
@@ -1,6 +1,6 @@
// RUN: clang -fsyntax-only -verify %s
void f(int i);
-void f(int i = 0); // expected-error {{previous definition is here}}
+void f(int i = 0); // expected-note {{previous definition is here}}
void f(int i = 17); // expected-error {{redefinition of default argument}}
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp
index cb5bd23a9eb..7f791daf5ee 100644
--- a/clang/test/SemaCXX/destructor.cpp
+++ b/clang/test/SemaCXX/destructor.cpp
@@ -31,8 +31,8 @@ struct E {
};
struct F {
- (~F)(); // expected-error{{previous declaration is here}}
- ~F(); // expected-error{{destructor cannot be redeclared}}
+ (~F)(); // expected-note {{previous declaration is here}}
+ ~F(); // expected-error {{destructor cannot be redeclared}}
};
~; // expected-error {{expected class name}}
diff --git a/clang/test/SemaCXX/fntype-decl.cpp b/clang/test/SemaCXX/fntype-decl.cpp
index ee72f0cdaf1..51aeab85f98 100644
--- a/clang/test/SemaCXX/fntype-decl.cpp
+++ b/clang/test/SemaCXX/fntype-decl.cpp
@@ -2,7 +2,7 @@
// PR2942
typedef void fn(int);
-fn f; // expected-error{{previous declaration is here}}
+fn f; // expected-note {{previous declaration is here}}
int g(int x, int y);
int g(int x, int y = 2);
@@ -10,7 +10,7 @@ int g(int x, int y = 2);
typedef int g_type(int, int);
g_type g;
-int h(int x) { // expected-error{{previous definition is here}}
+int h(int x) { // expected-note {{previous definition is here}}
return g(x);
}
diff --git a/clang/test/SemaCXX/namespace.cpp b/clang/test/SemaCXX/namespace.cpp
index 62251d3535e..848dc276715 100644
--- a/clang/test/SemaCXX/namespace.cpp
+++ b/clang/test/SemaCXX/namespace.cpp
@@ -1,18 +1,18 @@
// RUN: clang -fsyntax-only -verify %s
-namespace A { // expected-error {{error: previous definition is here}}
+namespace A { // expected-note {{previous definition is here}}
int A;
void f() { A = 0; }
}
-void f() { A = 0; } // expected-error {{error: unexpected namespace name 'A': expected expression}}
-int A; // expected-error {{error: redefinition of 'A' as different kind of symbol}}
-class A; // expected-error {{error: redefinition of 'A' as different kind of symbol}}
+void f() { A = 0; } // expected-error {{unexpected namespace name 'A': expected expression}}
+int A; // expected-error {{redefinition of 'A' as different kind of symbol}}
+class A; // expected-error {{redefinition of 'A' as different kind of symbol}}
-class B {}; // expected-error {{error: previous definition is here}}
-namespace B {} // expected-error {{error: redefinition of 'B' as different kind of symbol}}
+class B {}; // expected-note {{previous definition is here}}
+namespace B {} // expected-error {{redefinition of 'B' as different kind of symbol}}
-void C(); // expected-error {{error: previous definition is here}}
-namespace C {} // expected-error {{error: redefinition of 'C' as different kind of symbol}}
+void C(); // expected-note {{previous definition is here}}
+namespace C {} // expected-error {{redefinition of 'C' as different kind of symbol}}
namespace D {
class D {};
@@ -38,7 +38,7 @@ namespace S1 {
namespace S3 {
void f() {
- x = 0; // expected-error {{error: incompatible type assigning 'int', expected 'class B'}}
+ x = 0; // expected-error {{incompatible type assigning 'int', expected 'class B'}}
}
}
diff --git a/clang/test/SemaCXX/overload-decl.cpp b/clang/test/SemaCXX/overload-decl.cpp
index 9b0d0e205e7..9814725085e 100644
--- a/clang/test/SemaCXX/overload-decl.cpp
+++ b/clang/test/SemaCXX/overload-decl.cpp
@@ -6,22 +6,22 @@ void f(int, int);
void f(int, ...);
typedef float Float;
-void f(int, Float); // expected-error {{error: previous declaration is here}}
+void f(int, Float); // expected-note {{previous declaration is here}}
-int f(int, Float); // expected-error {{error: functions that differ only in their return type cannot be overloaded}}
+int f(int, Float); // expected-error {{functions that differ only in their return type cannot be overloaded}}
-void g(void); // expected-error {{error: previous declaration is here}}
-int g(); // expected-error {{error: functions that differ only in their return type cannot be overloaded}}
+void g(void); // expected-note {{previous declaration is here}}
+int g(); // expected-error {{functions that differ only in their return type cannot be overloaded}}
class X {
void f();
void f(int);
void f() const;
- void g(int); // expected-error {{error: previous declaration is here}}
- void g(int, float); // expected-error {{error: previous declaration is here}}
- int g(int, Float); // expected-error {{error: functions that differ only in their return type cannot be overloaded}}
+ void g(int); // expected-note {{previous declaration is here}}
+ void g(int, float); // expected-note {{previous declaration is here}}
+ int g(int, Float); // expected-error {{functions that differ only in their return type cannot be overloaded}}
static void g(float);
- static void g(int); // expected-error {{error: static and non-static member functions with the same parameter types cannot be overloaded}}
+ static void g(int); // expected-error {{static and non-static member functions with the same parameter types cannot be overloaded}}
};
diff --git a/clang/test/SemaCXX/typedef-redecl.cpp b/clang/test/SemaCXX/typedef-redecl.cpp
index c37a08ab3aa..eabcef8b319 100644
--- a/clang/test/SemaCXX/typedef-redecl.cpp
+++ b/clang/test/SemaCXX/typedef-redecl.cpp
@@ -1,12 +1,12 @@
// RUN: clang -fsyntax-only -verify %s
typedef int INT;
-typedef INT REALLY_INT; // expected-error{{previous definition is here}}
+typedef INT REALLY_INT; // expected-note {{previous definition is here}}
typedef REALLY_INT REALLY_REALLY_INT;
typedef REALLY_INT BOB;
typedef float REALLY_INT; // expected-error{{typedef redefinition with different types ('float' vs 'INT')}}
class X {
- typedef int result_type; // expected-error{{previous definition is here}}
- typedef INT result_type; // expected-error{{redefinition of 'result_type'}}
+ typedef int result_type; // expected-note {{previous definition is here}}
+ typedef INT result_type; // expected-error {{redefinition of 'result_type'}}
};
diff --git a/clang/test/SemaObjC/DoubleMethod.m b/clang/test/SemaObjC/DoubleMethod.m
index 70c7ed55f1e..07e89120fb8 100644
--- a/clang/test/SemaObjC/DoubleMethod.m
+++ b/clang/test/SemaObjC/DoubleMethod.m
@@ -10,7 +10,7 @@
@end
@implementation Subclass
-- (void) method {;} // expected-error {{previous declaration is here}}
+- (void) method {;} // expected-note {{previous declaration is here}}
- (void) method {;} // expected-error {{duplicate declaration of method 'method'}}
@end
diff --git a/clang/test/SemaObjC/alias-test-1.m b/clang/test/SemaObjC/alias-test-1.m
index fdaccf3f8bc..377f62f5baa 100644
--- a/clang/test/SemaObjC/alias-test-1.m
+++ b/clang/test/SemaObjC/alias-test-1.m
@@ -2,7 +2,7 @@
@compatibility_alias alias4 foo; // expected-warning {{cannot find interface declaration for 'foo'}}
-@class class2; // expected-error {{previous declaration is here}}
+@class class2; // expected-note {{previous declaration is here}}
@class class3;
typedef int I; // expected-warning {{previous declaration is here}}
@@ -13,7 +13,7 @@ typedef int I; // expected-warning {{previous declaration is here}}
@compatibility_alias alias class3; // expected-error {{conflicting types for alias 'alias'}}
-typedef int alias2; // expected-error {{previous declaration is here}}
+typedef int alias2; // expected-note {{previous declaration is here}}
@compatibility_alias alias2 class3; // expected-error {{conflicting types for alias 'alias2'}}
alias *p;
diff --git a/clang/test/SemaObjC/alias-test-2.m b/clang/test/SemaObjC/alias-test-2.m
index bdaeefe5a36..4eb2007d197 100644
--- a/clang/test/SemaObjC/alias-test-2.m
+++ b/clang/test/SemaObjC/alias-test-2.m
@@ -1,7 +1,7 @@
// RUN: clang -fsyntax-only -verify %s
// Note: GCC doesn't produce any of the following errors.
-@interface Super @end // expected-error {{previous definition is here}}
+@interface Super @end // expected-note {{previous definition is here}}
@interface MyWpModule @end // expected-note {{previous definition is here}}
diff --git a/clang/test/SemaObjC/check-dup-decl-methods-1.m b/clang/test/SemaObjC/check-dup-decl-methods-1.m
index 36a98a24a46..985a4c147f9 100644
--- a/clang/test/SemaObjC/check-dup-decl-methods-1.m
+++ b/clang/test/SemaObjC/check-dup-decl-methods-1.m
@@ -8,7 +8,7 @@
@interface T @end
@interface class1 : SUPER
-- (int) meth; // expected-error {{previous declaration is here}}
+- (int) meth; // expected-note {{previous declaration is here}}
- (int*) meth; // expected-error {{duplicate declaration of method 'meth'}}
- (T*) meth1;
- (T*) meth1;
@@ -16,7 +16,7 @@
@end
@interface class1(cat)
-- (int) catm : (char)ch1; // expected-error {{previous declaration is here}}
+- (int) catm : (char)ch1; // expected-note {{previous declaration is here}}
- (int) catm1 : (char)ch : (int)i;
- (int) catm : (char*)ch1; // expected-error {{duplicate declaration of method 'catm:'}}
+ (int) catm1 : (char)ch : (int)i;
@@ -24,15 +24,15 @@
@end
@interface class1(cat1)
-+ (int) catm1 : (char)ch : (int)i; // expected-error {{previous declaration is here}}
-+ (T*) meth1; // expected-error {{previous declaration is here}}
++ (int) catm1 : (char)ch : (int)i; // expected-note {{previous declaration is here}}
++ (T*) meth1; // expected-note {{previous declaration is here}}
+ (int) catm1 : (char)ch : (int*)i; // expected-error {{duplicate declaration of method 'catm1::'}}
+ (T**) meth1; // expected-error {{duplicate declaration of method 'meth1'}}
+ (int) foobar;
@end
@protocol P
-- (int) meth; // expected-error {{previous declaration is here}}
+- (int) meth; // expected-note {{previous declaration is here}}
- (int*) meth; // expected-error {{duplicate declaration of method 'meth'}}
@end
diff --git a/clang/test/SemaObjC/check-dup-objc-decls-1.m b/clang/test/SemaObjC/check-dup-objc-decls-1.m
index 28c6068afd0..fa9b8674be0 100644
--- a/clang/test/SemaObjC/check-dup-objc-decls-1.m
+++ b/clang/test/SemaObjC/check-dup-objc-decls-1.m
@@ -1,11 +1,11 @@
// RUN: clang -fsyntax-only -verify %s
-@interface Foo // expected-error {{previous definition is here}}
+@interface Foo // expected-note {{previous definition is here}}
@end
float Foo; // expected-error {{redefinition of 'Foo' as different kind of symbol}}
-@class Bar; // expected-error {{previous definition is here}}
+@class Bar; // expected-note {{previous definition is here}}
typedef int Bar; // expected-error {{redefinition of 'Bar' as different kind of symbol}}
@@ -13,12 +13,12 @@ typedef int Bar; // expected-error {{redefinition of 'Bar' as different kind of
@end
-typedef int OBJECT; // expected-error {{previous definition is here}}
+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-error {{previous definition is here}}
+typedef int Gorf; // expected-note {{previous definition is here}}
@interface Gorf @end // expected-error {{redefinition of 'Gorf' as different kind of symbol}}
diff --git a/clang/test/SemaObjC/class-conforming-protocol-1.m b/clang/test/SemaObjC/class-conforming-protocol-1.m
index 6afee0d3d4d..00f3204c628 100644
--- a/clang/test/SemaObjC/class-conforming-protocol-1.m
+++ b/clang/test/SemaObjC/class-conforming-protocol-1.m
@@ -5,11 +5,11 @@
@protocol P3 @end
@interface INTF
-- (INTF*) METH1; // expected-error {{previous declaration is here}}
+- (INTF*) METH1; // expected-note {{previous declaration is here}}
- (INTF<P1>*) METH1; // expected-error {{duplicate declaration of method 'METH1'}}
- (INTF<P1,P2>*) METH2;
-- (INTF<P2,P1>*) METH2; // expected-error {{previous declaration is here}}
+- (INTF<P2,P1>*) METH2; // expected-note {{previous declaration is here}}
- (INTF<P2,P1,P3>*) METH2; // expected-error {{duplicate declaration of method 'METH2'}}
- (INTF<P2,P1,P3>*) METH3;
diff --git a/clang/test/SemaObjC/class-def-test-1.m b/clang/test/SemaObjC/class-def-test-1.m
index cf0ef53cae2..ef226a515f1 100644
--- a/clang/test/SemaObjC/class-def-test-1.m
+++ b/clang/test/SemaObjC/class-def-test-1.m
@@ -4,17 +4,17 @@
@interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER'}}
-typedef int INTF; // expected-error {{previous definition is here}}
+typedef int INTF; // expected-note {{previous definition is here}}
@interface INTF @end // expected-error {{redefinition of 'INTF' as different kind of symbol}}
-@interface OBJECT @end // expected-error {{previous definition is here}}
+@interface OBJECT @end // expected-note {{previous definition is here}}
@interface INTF1 : OBJECT @end // expected-note {{previous definition is here}}
@interface INTF1 : OBJECT @end // expected-error {{duplicate interface definition for class 'INTF1'}}
-typedef int OBJECT; // expected-error {{previous definition is here}} \
+typedef int OBJECT; // expected-note {{previous definition is here}} \
expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
@interface INTF2 : OBJECT @end // expected-error {{redefinition of 'OBJECT' as different kind of symbol}}
diff --git a/clang/test/SemaObjC/class-impl-1.m b/clang/test/SemaObjC/class-impl-1.m
index dedce58d2c0..a3a185221b3 100644
--- a/clang/test/SemaObjC/class-impl-1.m
+++ b/clang/test/SemaObjC/class-impl-1.m
@@ -1,8 +1,8 @@
// RUN: clang -fsyntax-only -verify %s
-typedef int INTF3; // expected-error {{previous definition is here}}
+typedef int INTF3; // expected-note {{previous definition is here}}
-@interface SUPER @end // expected-error {{previous definition is here}}
+@interface SUPER @end // expected-note {{previous definition is here}}
@interface OBJECT @end
diff --git a/clang/test/SemaObjC/conflicting-ivar-test-1.m b/clang/test/SemaObjC/conflicting-ivar-test-1.m
index c5a6be45a4f..3f27b2c1772 100644
--- a/clang/test/SemaObjC/conflicting-ivar-test-1.m
+++ b/clang/test/SemaObjC/conflicting-ivar-test-1.m
@@ -3,7 +3,7 @@
@interface INTF
{
@public
- int IVAR; // expected-error {{previous definition is here}}
+ int IVAR; // expected-note {{previous definition is here}}
}
@end
@@ -54,7 +54,7 @@
@interface INTF3
{
@public
- int IVAR; // expected-error {{previous definition is here}}
+ int IVAR; // expected-note {{previous definition is here}}
}
@end
diff --git a/clang/test/SemaObjC/ivar-sem-check-1.m b/clang/test/SemaObjC/ivar-sem-check-1.m
index 4e810a29a81..4e464578fde 100644
--- a/clang/test/SemaObjC/ivar-sem-check-1.m
+++ b/clang/test/SemaObjC/ivar-sem-check-1.m
@@ -8,11 +8,11 @@ typedef int FOO();
struct F {} JJ;
int arr[]; // expected-error {{field 'arr' has incomplete type}}
struct S IC; // expected-error {{field 'IC' has incomplete type}}
- struct T { // expected-error {{previous definition is here}}
+ struct T { // expected-note {{previous definition is here}}
struct T {} X; // expected-error {{nested redefinition of 'struct'}}
}YYY;
FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
- int kaka; // expected-error {{previous definition is here}}
+ int kaka; // expected-note {{previous definition is here}}
int kaka; // expected-error {{duplicate member 'kaka'}}
char ch[]; // expected-error {{field 'ch' has incomplete type}}
}
OpenPOWER on IntegriCloud