aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-11-05 15:47:02 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-11-05 15:47:02 +0000
commit2ac67239b4ab81c439ffcc56367574c869f87dae (patch)
tree632ec89a17ac419bf889877d83b4aa279fa3e4b2 /lib/Parse/ParseDecl.cpp
parentff87603939b2620dcf345c0fa2971314394a77c3 (diff)
Parse C++0x constexpr. Test case follows when this does something useful.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86135 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index e905553fd8..99752b5950 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -769,6 +769,7 @@ bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
/// [C++] 'virtual'
/// [C++] 'explicit'
/// 'friend': [C++ dcl.friend]
+/// 'constexpr': [C++0x dcl.constexpr]
///
void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
@@ -1070,6 +1071,11 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
}
break;
+ // constexpr
+ case tok::kw_constexpr:
+ isInvalid = DS.SetConstexprSpec(Loc, PrevSpec, DiagID);
+ break;
+
// type-specifier
case tok::kw_short:
isInvalid = DS.SetTypeSpecWidth(DeclSpec::TSW_short, Loc, PrevSpec,