diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-07 00:43:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-07 00:43:41 +0000 |
commit | bcbffc46f1ad3796c4582fa1e3a9113b5aa26061 (patch) | |
tree | c87298e6e890898fc9a551c49fe7e7a50f384e70 /lib/Sema/SemaType.cpp | |
parent | 234a4c286e197f7ca9207d60433d40c802484333 (diff) |
Initial implementation of anonymous unions (and, as a GNU extension,
structures and classes) in C++. Covers name lookup and the synthesis
and member access for the unnamed objects/fields associated with
anonymous unions.
Some C++ semantic checks are still missing (anonymous unions can't
have function members, static data members, etc.), and there is no
support for anonymous structs or unions in C.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index a6441c8d70..f780342a60 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -538,7 +538,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S, unsigned Skip) { ((D.getContext() != Declarator::MemberContext && (!D.getCXXScopeSpec().isSet() || !static_cast<DeclContext*>(D.getCXXScopeSpec().getScopeRep()) - ->isCXXRecord())) || + ->isRecord())) || D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static)) { if (D.isFunctionDeclarator()) Diag(D.getIdentifierLoc(), diag::err_invalid_qualified_function_type); |