diff options
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 8cb5b09..ece3698 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -4514,6 +4514,9 @@ void Parser::ParseDeclarationSpecifiers( break; case tok::kw_groupshared: + case tok::kw_in: + case tok::kw_inout: + case tok::kw_out: // NOTE: ParseHLSLQualifiers will consume the qualifier token. ParseHLSLQualifiers(DS.getAttributes()); continue; @@ -5550,7 +5553,6 @@ bool Parser::isTypeSpecifierQualifier() { case tok::kw___read_write: case tok::kw___write_only: case tok::kw___funcref: - case tok::kw_groupshared: return true; case tok::kw_private: @@ -5559,6 +5561,13 @@ bool Parser::isTypeSpecifierQualifier() { // C11 _Atomic case tok::kw__Atomic: return true; + + // HLSL type qualifiers + case tok::kw_groupshared: + case tok::kw_in: + case tok::kw_inout: + case tok::kw_out: + return getLangOpts().HLSL; } } @@ -6058,6 +6067,9 @@ void Parser::ParseTypeQualifierListOpt( break; case tok::kw_groupshared: + case tok::kw_in: + case tok::kw_inout: + case tok::kw_out: // NOTE: ParseHLSLQualifiers will consume the qualifier token. ParseHLSLQualifiers(DS.getAttributes()); continue; |