1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct string {};
class StringPiece; // expected-note {{forward declaration of 'StringPiece'}} \
// expected-note {{forward declaration of 'StringPiece'}}
struct Test {
void expectStringPiece(const StringPiece& blah) {}; // expected-note {{passing argument to parameter 'blah' here}}
void test(const string& s) {
expectStringPiece(s); // expected-error {{no viable conversion from 'const string' to incomplete type 'const StringPiece'}}
}
};
struct TestStatic {
static void expectStringPiece(const StringPiece& blah) {}; // expected-note {{passing argument to parameter 'blah' here}}
static void test(const string& s) {
expectStringPiece(s); // expected-error {{no viable conversion from 'const string' to incomplete type 'const StringPiece'}}
}
};
|