annotate clang/test/PCH/cxx0x-delegating-ctors.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // Test this without pch.
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -include %s -std=c++11 -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Test with pch.
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -x c++-header -std=c++11 -emit-pch -o %t %s
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -std=c++11 -include-pch %t -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 #ifndef PASS1
anatofuz
parents:
diff changeset
9 #define PASS1
anatofuz
parents:
diff changeset
10 struct foo {
anatofuz
parents:
diff changeset
11 foo(int) : foo() { }
anatofuz
parents:
diff changeset
12 foo();
anatofuz
parents:
diff changeset
13 foo(bool) : foo('c') { }
anatofuz
parents:
diff changeset
14 foo(char) : foo(true) { }
anatofuz
parents:
diff changeset
15 };
anatofuz
parents:
diff changeset
16 #else
anatofuz
parents:
diff changeset
17 foo::foo() : foo(1) { } // expected-error{{creates a delegation cycle}} \
anatofuz
parents:
diff changeset
18 // expected-note{{which delegates to}}
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 // expected-note@11{{it delegates to}}
anatofuz
parents:
diff changeset
21 // expected-note@13{{it delegates to}}
anatofuz
parents:
diff changeset
22 // expected-error@14{{creates a delegation cycle}}
anatofuz
parents:
diff changeset
23 // expected-note@14{{which delegates to}}
anatofuz
parents:
diff changeset
24 #endif