aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse')
-rw-r--r--lib/Parse/ParseDecl.cpp7
-rw-r--r--lib/Parse/ParseExpr.cpp1
-rw-r--r--lib/Parse/ParseTentative.cpp1
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index e11fb913a7..8e24a14d0b 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -2781,6 +2781,10 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_image3d_t, Loc,
PrevSpec, DiagID);
break;
+ case tok::kw_sampler_t:
+ isInvalid = DS.SetTypeSpecType(DeclSpec::TST_sampler_t, Loc,
+ PrevSpec, DiagID);
+ break;
case tok::kw_event_t:
isInvalid = DS.SetTypeSpecType(DeclSpec::TST_event_t, Loc,
PrevSpec, DiagID);
@@ -3635,6 +3639,7 @@ bool Parser::isKnownToBeTypeSpecifier(const Token &Tok) const {
case tok::kw_image2d_t:
case tok::kw_image2d_array_t:
case tok::kw_image3d_t:
+ case tok::kw_sampler_t:
case tok::kw_event_t:
// struct-or-union-specifier (C99) or class-specifier (C++)
@@ -3716,6 +3721,7 @@ bool Parser::isTypeSpecifierQualifier() {
case tok::kw_image2d_t:
case tok::kw_image2d_array_t:
case tok::kw_image3d_t:
+ case tok::kw_sampler_t:
case tok::kw_event_t:
// struct-or-union-specifier (C99) or class-specifier (C++)
@@ -3869,6 +3875,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
case tok::kw_image2d_t:
case tok::kw_image2d_array_t:
case tok::kw_image3d_t:
+ case tok::kw_sampler_t:
case tok::kw_event_t:
// struct-or-union-specifier (C99) or class-specifier (C++)
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 4ed0bd0c6e..7775909cf5 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1024,6 +1024,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
case tok::kw_image2d_t:
case tok::kw_image2d_array_t:
case tok::kw_image3d_t:
+ case tok::kw_sampler_t:
case tok::kw_event_t: {
if (!getLangOpts().CPlusPlus) {
Diag(Tok, diag::err_expected_expression);
diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp
index 1116daa4d1..b3cf983bbc 100644
--- a/lib/Parse/ParseTentative.cpp
+++ b/lib/Parse/ParseTentative.cpp
@@ -843,6 +843,7 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) {
case tok::kw_image2d_t:
case tok::kw_image2d_array_t:
case tok::kw_image3d_t:
+ case tok::kw_sampler_t:
case tok::kw_event_t:
case tok::kw___unknown_anytype:
return TPResult::False();