diff options
author | Anders Carlsson <andersca@mac.com> | 2009-06-24 17:47:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-06-24 17:47:40 +0000 |
commit | 6fd634f4ac59f5923cffadadb99d19f23c18707a (patch) | |
tree | 7fb6888135a423b1d28e54bdfc51712ba16e5b05 /lib/Sema/SemaType.cpp | |
parent | 02995ce680d1bcf9f17bcfdf759bd74b08aa3948 (diff) |
Parse the C++0x decltype specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74086 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 967f650d13..297dee9a50 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -236,6 +236,17 @@ QualType Sema::ConvertDeclSpecToType(const DeclSpec &DS, Result = Context.getTypeOfExprType(E); break; } + case DeclSpec::TST_decltype: { + Expr *E = static_cast<Expr *>(DS.getTypeRep()); + assert(E && "Didn't get an expression for decltype?"); + // TypeQuals handled by caller. + + // FIXME: Use the right type! + Result = Context.IntTy; + isInvalid = true; + break; + } + case DeclSpec::TST_error: Result = Context.IntTy; isInvalid = true; |