summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/incomplete-decl.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-19 19:26:10 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-19 19:26:10 +0000
commitdd430f7ec9511f440a55d090c1a8d4df118e0e68 (patch)
tree7b670938f8911ad43483817101a0f90454211517 /clang/test/Sema/incomplete-decl.c
parentababe7d47df60f0a68b3a3712de4032e1a12d3fb (diff)
downloadbcm5719-llvm-dd430f7ec9511f440a55d090c1a8d4df118e0e68.tar.gz
bcm5719-llvm-dd430f7ec9511f440a55d090c1a8d4df118e0e68.zip
Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about struct/class/union/enum types when possible, either by pointing to the forward declaration of that type or by pointing to the definition (if we're in the process of defining that type). Fixes <rdar://problem/6500531>. llvm-svn: 62521
Diffstat (limited to 'clang/test/Sema/incomplete-decl.c')
-rw-r--r--clang/test/Sema/incomplete-decl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c
index fedf2c69f7c..bd603681d64 100644
--- a/clang/test/Sema/incomplete-decl.c
+++ b/clang/test/Sema/incomplete-decl.c
@@ -1,5 +1,7 @@
// RUN: clang -fsyntax-only -verify %s
+struct foo; // expected-note {{forward declaration of 'struct foo'}}
+
void b; // expected-error {{variable has incomplete type 'void'}}
struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
OpenPOWER on IntegriCloud