aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-12 22:49:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-12 22:49:06 +0000
commit4920f1ffb62b13b88e579476803c093f97f3e17f (patch)
tree057ff38bb1e1460a260952a28c27369b756b82b6 /lib/Parse/ParseDecl.cpp
parent1e0ead411bd1eca1b18e08684b79993e40dae1db (diff)
Implement support for anonymous structs and unions in C. Both C and
C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 3ec1764612..8d4705a7bf 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -888,9 +888,10 @@ ParseStructDeclaration(DeclSpec &DS,
SourceLocation DSStart = Tok.getLocation();
ParseSpecifierQualifierList(DS);
- // If there are no declarators, issue a warning.
+ // If there are no declarators, this is a free-standing declaration
+ // specifier. Let the actions module cope with it.
if (Tok.is(tok::semi)) {
- Diag(DSStart, diag::w_no_declarators);
+ Actions.ParsedFreeStandingDeclSpec(CurScope, DS);
return;
}