diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-24 05:47:35 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-24 05:47:35 +0000 |
commit | 5e089fe1affb63d670ea02010b104bd9fa3477a1 (patch) | |
tree | efbc3d4783da036bfecb38b64b8c1a23f276296f /lib/Parse/ParseExprCXX.cpp | |
parent | 495f42a32610c03591b49cd06ac09c5408742f86 (diff) |
Support decltype as a simple-type-specifier.
This makes all sorts of fun examples work with decltype.
Reviewed by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExprCXX.cpp')
-rw-r--r-- | lib/Parse/ParseExprCXX.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index 8046f6b88c..37d9b5b2b9 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -1418,8 +1418,11 @@ void Parser::ParseCXXSimpleTypeSpecifier(DeclSpec &DS) { case tok::kw_bool: DS.SetTypeSpecType(DeclSpec::TST_bool, Loc, PrevSpec, DiagID); break; + case tok::annot_decltype: + case tok::kw_decltype: + DS.SetRangeEnd(ParseDecltypeSpecifier(DS)); + return DS.Finish(Diags, PP); - // FIXME: C++0x decltype support. // GNU typeof support. case tok::kw_typeof: ParseTypeofSpecifier(DS); |