diff options
Diffstat (limited to 'test/SemaCXX/incomplete-call.cpp')
-rw-r--r-- | test/SemaCXX/incomplete-call.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/SemaCXX/incomplete-call.cpp b/test/SemaCXX/incomplete-call.cpp index 5bdaf82..d627c33 100644 --- a/test/SemaCXX/incomplete-call.cpp +++ b/test/SemaCXX/incomplete-call.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -struct A; // expected-note 14 {{forward declaration of 'struct A'}} +struct A; // expected-note 14 {{forward declaration of 'A'}} A f(); // expected-note {{note: 'f' declared here}} @@ -15,29 +15,29 @@ struct B { }; void g() { - f(); // expected-error {{calling 'f' with incomplete return type 'struct A'}} + f(); // expected-error {{calling 'f' with incomplete return type 'A'}} typedef A (*Func)(); Func fp; - fp(); // expected-error {{calling function with incomplete return type 'struct A'}} - ((Func)0)(); // expected-error {{calling function with incomplete return type 'struct A'}} + fp(); // expected-error {{calling function with incomplete return type 'A'}} + ((Func)0)(); // expected-error {{calling function with incomplete return type 'A'}} B b; - b.f(); // expected-error {{calling 'f' with incomplete return type 'struct A'}} + b.f(); // expected-error {{calling 'f' with incomplete return type 'A'}} - b.operator()(); // expected-error {{calling 'operator()' with incomplete return type 'struct A'}} - b.operator A(); // expected-error {{calling 'operator A' with incomplete return type 'struct A'}} - b.operator!(); // expected-error {{calling 'operator!' with incomplete return type 'struct A'}} + b.operator()(); // expected-error {{calling 'operator()' with incomplete return type 'A'}} + b.operator A(); // expected-error {{calling 'operator A' with incomplete return type 'A'}} + b.operator!(); // expected-error {{calling 'operator!' with incomplete return type 'A'}} - !b; // expected-error {{calling 'operator!' with incomplete return type 'struct A'}} - b(); // expected-error {{calling 'operator()' with incomplete return type 'struct A'}} - b++; // expected-error {{calling 'operator++' with incomplete return type 'struct A'}} - b[0]; // expected-error {{calling 'operator[]' with incomplete return type 'struct A'}} - b + 1; // expected-error {{calling 'operator+' with incomplete return type 'struct A'}} - b->f(); // expected-error {{calling 'operator->' with incomplete return type 'struct A'}} + !b; // expected-error {{calling 'operator!' with incomplete return type 'A'}} + b(); // expected-error {{calling 'operator()' with incomplete return type 'A'}} + b++; // expected-error {{calling 'operator++' with incomplete return type 'A'}} + b[0]; // expected-error {{calling 'operator[]' with incomplete return type 'A'}} + b + 1; // expected-error {{calling 'operator+' with incomplete return type 'A'}} + b->f(); // expected-error {{calling 'operator->' with incomplete return type 'A'}} A (B::*mfp)() = 0; - (b.*mfp)(); // expected-error {{calling function with incomplete return type 'struct A'}} + (b.*mfp)(); // expected-error {{calling function with incomplete return type 'A'}} } |