diff options
Diffstat (limited to 'Sema/SemaType.cpp')
-rw-r--r-- | Sema/SemaType.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Sema/SemaType.cpp b/Sema/SemaType.cpp index cf72e38e2f..d70002340b 100644 --- a/Sema/SemaType.cpp +++ b/Sema/SemaType.cpp @@ -95,6 +95,18 @@ static QualType ConvertDeclSpecToType(const DeclSpec &DS, ASTContext &Ctx) { // TypeQuals handled by caller. return Ctx.getTypedefType(cast<TypedefDecl>(D)); } + case DeclSpec::TST_typeofType: { + QualType T = QualType::getFromOpaquePtr(DS.getTypeRep()); + assert(!T.isNull() && "Didn't get a type for typeof?"); + // TypeQuals handled by caller. + return Ctx.getTypeOfType(T); + } + case DeclSpec::TST_typeofExpr: { + Expr *E = static_cast<Expr *>(DS.getTypeRep()); + assert(E && "Didn't get an expression for typeof?"); + // TypeQuals handled by caller. + return Ctx.getTypeOfType(E); + } } } |