aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-09 16:51:54 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-09 16:51:54 +0000
commit64c438a4be2a871fa43c78264663ba1e9788b94d (patch)
treed88760d32970f7715de5fc0d8aa444fa8857628f /lib/Parse/ParseDecl.cpp
parent907747b3a67a41420ead8ef1fc5e6bd9dc9e0ad9 (diff)
Implement support for the 'wchar_t' C++ type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54585 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 1cf331702d..5b4473ea4d 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -376,6 +376,7 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS) {
/// struct-or-union-specifier
/// enum-specifier
/// typedef-name
+/// [C++] 'wchar_t'
/// [C++] 'bool'
/// [C99] '_Bool'
/// [C99] '_Complex'
@@ -517,6 +518,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
case tok::kw_double:
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_double, Loc, PrevSpec);
break;
+ case tok::kw_wchar_t: // [C++ 2.11p1]
+ isInvalid = DS.SetTypeSpecType(DeclSpec::TST_wchar, Loc, PrevSpec);
+ break;
case tok::kw_bool: // [C++ 2.11p1]
case tok::kw__Bool:
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_bool, Loc, PrevSpec);
@@ -941,6 +945,7 @@ bool Parser::isTypeSpecifierQualifier() const {
case tok::kw__Imaginary:
case tok::kw_void:
case tok::kw_char:
+ case tok::kw_wchar_t:
case tok::kw_int:
case tok::kw_float:
case tok::kw_double:
@@ -992,6 +997,7 @@ bool Parser::isDeclarationSpecifier() const {
case tok::kw__Imaginary:
case tok::kw_void:
case tok::kw_char:
+ case tok::kw_wchar_t:
case tok::kw_int:
case tok::kw_float:
case tok::kw_double: