Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / delegating-constructors.cpp
blobdb3939d9b0e0239d64d25b83becd340e0cd3ffb4
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify
3 namespace PR10457 {
5 class string
7 string(const char* str, unsigned);
9 public:
10 template <unsigned N>
11 string(const char (&str)[N])
12 : string(str) {} // expected-error{{constructor for 'string<6U>' creates a delegation cycle}}
15 void f() {
16 string s("hello");
19 struct Foo {
20 Foo(int) { }
23 template <typename T>
24 Foo(T, int i) : Foo(i) { }
27 void test_Foo()
29 Foo f(1, 1);
33 namespace PR12890 {
34 class Document
36 public:
37 Document() = default;
39 template <class T>
40 explicit
41 Document(T&& t) : Document()
45 void f()
47 Document d(1);