aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-24 05:47:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-24 05:47:35 +0000
commit5e089fe1affb63d670ea02010b104bd9fa3477a1 (patch)
treeefbc3d4783da036bfecb38b64b8c1a23f276296f /lib/Parse/ParseTentative.cpp
parent495f42a32610c03591b49cd06ac09c5408742f86 (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/ParseTentative.cpp')
-rw-r--r--lib/Parse/ParseTentative.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index fe46456040..4f80da2dc9 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -1009,6 +1009,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
case tok::kw_float:
case tok::kw_double:
case tok::kw_void:
+ case tok::annot_decltype:
if (NextToken().is(tok::l_paren))
return TPResult::Ambiguous();
@@ -1038,10 +1039,6 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() {
return TPResult::True();
}
- // C++0x decltype support.
- case tok::annot_decltype:
- return TPResult::True();
-
// C++0x type traits support
case tok::kw___underlying_type:
return TPResult::True();