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