[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
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index 11f1aeb..81079cd 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -1411,6 +1411,7 @@
case tok::kw_const:
case tok::kw_volatile:
// OpenCL address space qualifiers
+ case tok::kw_private:
case tok::kw___private:
case tok::kw___local:
case tok::kw___global: