]> granicus.if.org Git - clang/commit
Add CheckCallReturnType and start using it for regular call expressions. This will...
authorAnders Carlsson <andersca@mac.com>
Fri, 9 Oct 2009 23:51:55 +0000 (23:51 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 9 Oct 2009 23:51:55 +0000 (23:51 +0000)
commit8c8d91917c307dc3ba4f60661377c745f2a6bef2
tree17e9e9e63862004965ff1777415f48fd7f89f87d
parent3135df59cbe140923d9e81c09e3e324c01418bb6
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
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/PartialDiagnostic.h
lib/Sema/Sema.h
lib/Sema/SemaExpr.cpp
lib/Sema/SemaOverload.cpp
lib/Sema/SemaType.cpp
test/CXX/dcl.dcl/dcl.spec/dcl.stc/p9.cpp
test/Sema/incomplete-call.c
test/SemaCXX/enum.cpp