summaryrefslogtreecommitdiff
path: root/test/Sema/init.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-21 17:11:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-21 17:11:58 +0000
commitb6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 (patch)
tree9d574fc3b816875c30e2e97338b0fa8338fb3079 /test/Sema/init.c
parent69667a03e07a052170f09226ef7614ca8ab21ac7 (diff)
downloadclang-b6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2.tar.gz
Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/init.c')
-rw-r--r--test/Sema/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/Sema/init.c b/test/Sema/init.c
index cbf75e1bb1..7938ec5568 100644
--- a/test/Sema/init.c
+++ b/test/Sema/init.c
@@ -74,8 +74,7 @@ int sym_fw1a_scr[] = {
};
// PR3001
-struct s1 s2 = { // expected-error{{tentative definition has type 'struct s1' that is never completed}} \
- // expected-note{{forward declaration of 'struct s1'}}
+struct s1 s2 = {
.a = sizeof(struct s3), // expected-error {{invalid application of 'sizeof'}} \
// expected-note{{forward declaration of 'struct s3'}}
.b = bogus // expected-error {{use of undeclared identifier 'bogus'}}