summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/PCH/cxx0x-delegating-ctors.cpp6
-rw-r--r--clang/test/PCH/cxx0x-delegating-ctors.h2
-rw-r--r--clang/test/SemaCXX/cxx0x-delegating-ctors.cpp7
3 files changed, 10 insertions, 5 deletions
diff --git a/clang/test/PCH/cxx0x-delegating-ctors.cpp b/clang/test/PCH/cxx0x-delegating-ctors.cpp
index 97f2f684fc2..132428957f7 100644
--- a/clang/test/PCH/cxx0x-delegating-ctors.cpp
+++ b/clang/test/PCH/cxx0x-delegating-ctors.cpp
@@ -5,4 +5,8 @@
// RUN: %clang_cc1 -x c++-header -std=c++0x -emit-pch -o %t %S/cxx0x-delegating-ctors.h
// RUN: %clang_cc1 -std=c++0x -include-pch %t -fsyntax-only -verify %s
-foo::foo() : foo(1) { } // expected-error{{delegates to itself}}
+// Currently we can't deal with a note in the header
+// XFAIL: *
+
+foo::foo() : foo(1) { } // expected-error{{creates a delegation cycle}} \
+ // expected-note{{which delegates to}}
diff --git a/clang/test/PCH/cxx0x-delegating-ctors.h b/clang/test/PCH/cxx0x-delegating-ctors.h
index 598982fdd27..f4cc6367918 100644
--- a/clang/test/PCH/cxx0x-delegating-ctors.h
+++ b/clang/test/PCH/cxx0x-delegating-ctors.h
@@ -1,6 +1,6 @@
// Header for PCH test cxx0x-delegating-ctors.cpp
struct foo {
- foo(int) : foo() { }
+ foo(int) : foo() { } // expected-note{{it delegates to}}
foo();
};
diff --git a/clang/test/SemaCXX/cxx0x-delegating-ctors.cpp b/clang/test/SemaCXX/cxx0x-delegating-ctors.cpp
index df88b6bc31d..a3e6ff3b4f9 100644
--- a/clang/test/SemaCXX/cxx0x-delegating-ctors.cpp
+++ b/clang/test/SemaCXX/cxx0x-delegating-ctors.cpp
@@ -22,14 +22,15 @@ foo::foo () : foo(-1) {
foo::foo (int, int) : foo() {
}
-foo::foo (bool) : foo(true) { // expected-error{{delegates to itself}}
+foo::foo (bool) : foo(true) { // expected-error{{creates a delegation cycle}}
}
// Good
-foo::foo (const float* f) : foo(*f) {
+foo::foo (const float* f) : foo(*f) { // expected-note{{it delegates to}}
}
-foo::foo (const float &f) : foo(&f) { //expected-error{{delegates to itself}}
+foo::foo (const float &f) : foo(&f) { //expected-error{{creates a delegation cycle}} \
+ //expected-note{{which delegates to}}
}
foo::foo (char) : i(3), foo(3) { // expected-error{{must appear alone}}
OpenPOWER on IntegriCloud