summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX')
-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
11 files changed, 51 insertions, 51 deletions
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'}}
};
OpenPOWER on IntegriCloud