aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorAnastasia Stulova <anastasia.stulova@arm.com>2019-03-25 11:54:02 +0000
committerAnastasia Stulova <anastasia.stulova@arm.com>2019-03-25 11:54:02 +0000
commit948e37c8ca8b4a4b72b0745c643fee1e4482c2d0 (patch)
treed895d88a8196d01310633ffda2ed3d7a325b6c59 /clang/lib/Parse/ParseDecl.cpp
parent62590fee899065319c2d496633e780439c3707da (diff)
downloadllvm-948e37c8ca8b4a4b72b0745c643fee1e4482c2d0.zip
llvm-948e37c8ca8b4a4b72b0745c643fee1e4482c2d0.tar.gz
llvm-948e37c8ca8b4a4b72b0745c643fee1e4482c2d0.tar.bz2
[OpenCL] Allow addr space spelling without __ prefix in C++.
For backwards compatibility we allow alternative spelling of address spaces - 'private', 'local', 'global', 'constant', 'generic'. In order to accept 'private' correctly, parsing has been changed to understand different use cases - access specifier vs address space. Fixes PR40707 and PR41011! Differential Revision: https://reviews.llvm.org/D59603 llvm-svn: 356888
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index c56c3c5..556fce2 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -3824,6 +3824,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
break;
};
LLVM_FALLTHROUGH;
+ case tok::kw_private:
case tok::kw___private:
case tok::kw___global:
case tok::kw___local:
@@ -4790,6 +4791,7 @@ bool Parser::isTypeSpecifierQualifier() {
case tok::kw___kindof:
+ case tok::kw_private:
case tok::kw___private:
case tok::kw___local:
case tok::kw___global:
@@ -4980,6 +4982,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
case tok::kw___kindof:
+ case tok::kw_private:
case tok::kw___private:
case tok::kw___local:
case tok::kw___global:
@@ -5192,6 +5195,7 @@ void Parser::ParseTypeQualifierListOpt(
break;
// OpenCL qualifiers:
+ case tok::kw_private:
case tok::kw___private:
case tok::kw___global:
case tok::kw___local: