diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-13 18:59:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-13 18:59:07 +0000 |
commit | 99dc91422144483c20d1c7381bc9ac634b646b04 (patch) | |
tree | 8d0b3af85da37304735f22f9b4bd104942176906 /lib/Sema/SemaType.cpp | |
parent | 3b7ff0d143014ea86328e8fa9196a7537dce7bea (diff) |
This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record. So this patch allows:
class C { };
class C c1;
But it does not contain the lookup bits, so this won't work yet:
C c2;
Patch by Doug Gregor!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 5e155f8817..223cb56636 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -95,11 +95,12 @@ QualType Sema::ConvertDeclSpecToType(DeclSpec &DS) { case DeclSpec::TST_decimal64: // _Decimal64 case DeclSpec::TST_decimal128: // _Decimal128 assert(0 && "FIXME: GNU decimal extensions not supported yet!"); + case DeclSpec::TST_class: case DeclSpec::TST_enum: case DeclSpec::TST_union: case DeclSpec::TST_struct: { Decl *D = static_cast<Decl *>(DS.getTypeRep()); - assert(D && "Didn't get a decl for a enum/union/struct?"); + assert(D && "Didn't get a decl for a class/enum/union/struct?"); assert(DS.getTypeSpecWidth() == 0 && DS.getTypeSpecComplex() == 0 && DS.getTypeSpecSign() == 0 && "Can't handle qualifiers on typedef names yet!"); |