diff options
author | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
---|---|---|
committer | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 10:55:47 +0000 |
commit | 21f18c4fda167dc5f72feddbd6a7ac1b63200a0d (patch) | |
tree | 80c1b120c64d3066fd4f5799174a16d8ed49eca0 /lib/Parse/ParseDecl.cpp | |
parent | f5a6aefa37d73fff3c47953e2c447f074e726a0e (diff) |
Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 7 |
1 files changed, 7 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++) |