summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/incomplete-call.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaCXX/incomplete-call.cpp')
-rw-r--r--clang/test/SemaCXX/incomplete-call.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/SemaCXX/incomplete-call.cpp b/clang/test/SemaCXX/incomplete-call.cpp
index defc851bb4a..c61b61a9c64 100644
--- a/clang/test/SemaCXX/incomplete-call.cpp
+++ b/clang/test/SemaCXX/incomplete-call.cpp
@@ -1,9 +1,10 @@
// RUN: clang-cc -fsyntax-only -verify %s
-struct A; // expected-note 3 {{forward declaration of 'struct A'}}
+struct A; // expected-note 4 {{forward declaration of 'struct A'}}
A f(); // expected-note {{note: 'f' declared here}}
struct B {
+ A f(); // expected-note {{'f' declared here}}
};
void g() {
@@ -13,4 +14,7 @@ void g() {
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'}}
+
+ B b;
+ b.f(); // expected-error {{calling 'f' with incomplete return type 'struct A'}}
}
OpenPOWER on IntegriCloud