aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-24 17:47:40 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-24 17:47:40 +0000
commit6fd634f4ac59f5923cffadadb99d19f23c18707a (patch)
tree7fb6888135a423b1d28e54bdfc51712ba16e5b05 /lib/Parse/ParseTentative.cpp
parent02995ce680d1bcf9f17bcfdf759bd74b08aa3948 (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/Parse/ParseTentative.cpp')
-rw-r--r--lib/Parse/ParseTentative.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index f31855b751..02687a216c 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -543,6 +543,7 @@ Parser::TPResult Parser::TryParseDeclarator(bool mayBeAbstract,
/// [GNU] typeof-specifier
/// [GNU] '_Complex'
/// [C++0x] 'auto' [TODO]
+/// [C++0x] 'decltype' ( expression )
///
/// type-name:
/// class-name
@@ -695,7 +696,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
return TPResult::True();
- // GNU typeof support.
+ // GNU typeof support.
case tok::kw_typeof: {
if (NextToken().isNot(tok::l_paren))
return TPResult::True();
@@ -716,6 +717,10 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
return TPResult::True();
}
+ // C++0x decltype support.
+ case tok::kw_decltype:
+ return TPResult::True();
+
default:
return TPResult::False();
}