summaryrefslogtreecommitdiff
path: root/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
commit342dd05bcbbc3a49e28aa176f31676c8740db89b (patch)
treeacf62d64dbdf449afacde3df3fd5e6c5078f302c /lib/Parse/ParseDecl.cpp
parent805d58dd43c1329590299f37ad2f48efbae3c78b (diff)
downloadclang-342dd05bcbbc3a49e28aa176f31676c8740db89b.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index c56c3c54b6..556fce2188 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/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: