[cfe-commits] r83693 - /cfe/trunk/test/SemaCXX/incomplete-call.cpp
Anders Carlsson
andersca at mac.com
Fri Oct 9 16:58:25 PDT 2009
Author: andersca
Date: Fri Oct 9 18:58:25 2009
New Revision: 83693
URL: http://llvm.org/viewvc/llvm-project?rev=83693&view=rev
Log:
Add another test.
Added:
cfe/trunk/test/SemaCXX/incomplete-call.cpp
Added: cfe/trunk/test/SemaCXX/incomplete-call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/incomplete-call.cpp?rev=83693&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/incomplete-call.cpp (added)
+++ cfe/trunk/test/SemaCXX/incomplete-call.cpp Fri Oct 9 18:58:25 2009
@@ -0,0 +1,16 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+struct A; // expected-note 3 {{forward declaration of 'struct A'}}
+
+A f(); // expected-note {{note: 'f' declared here}}
+
+struct B {
+};
+
+void g() {
+ f(); // expected-error {{calling 'f' with incomplete return type 'struct 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'}}
+}
More information about the cfe-commits
mailing list