aboutsummaryrefslogtreecommitdiff
path: root/test/CXX
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-10-09 23:51:55 +0000
committerAnders Carlsson <andersca@mac.com>2009-10-09 23:51:55 +0000
commit8c8d91917c307dc3ba4f60661377c745f2a6bef2 (patch)
tree17e9e9e63862004965ff1777415f48fd7f89f87d /test/CXX
parent3135df59cbe140923d9e81c09e3e324c01418bb6 (diff)
Add CheckCallReturnType and start using it for regular call expressions. This will improve error messages. For
struct B; B f(); void g() { f(); } We now get t.cpp:6:3: error: calling 'f' with incomplete return type 'struct B' f(); ^~~ t.cpp:3:3: note: 'f' declared here B f(); ^ t.cpp:1:8: note: forward declaration of 'struct B' struct B; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CXX')
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
index 5d9f9e7a51..907a91a86e 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
@@ -2,11 +2,11 @@
struct S; // expected-note {{forward declaration of 'struct S'}}
extern S a;
-extern S f();
+extern S f(); // expected-note {{'f' declared here}}
extern void g(S a); // expected-note {{candidate function}}
void h() {
// FIXME: This diagnostic could be better.
g(a); // expected-error {{no matching function for call to 'g'}}
- f(); // expected-error {{return type of called function ('struct S') is incomplete}}
+ f(); // expected-error {{calling 'f' with incomplete return type 'struct S'}}
}