[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 26 04:42:44 PDT 2018


svenvh added inline comments.


================
Comment at: include/clang/Basic/TokenKinds.def:255
+//   KEYNOOPENCL  - This is a keyword that is not supported in OpenCL C
+//                  nor in OpenCL C++.
 //   KEYALTIVEC - This is a keyword in AltiVec
----------------
rjmccall wrote:
> `KEYNOOPENCL` is dead now, I think.
There are still some other uses of `KEYNOOPENCL` (already there before this patch).


================
Comment at: lib/Sema/DeclSpec.cpp:621
+    // OpenCL C++ 1.0 s2.9: the thread_local storage qualifier is not
+    // supported.
+    case TSCS_thread_local:
----------------
rjmccall wrote:
> Do you really care about the spelling of the specifier?  Presumably `__thread` (the GNU extension) and `_Thread_local` (the C11 feature) are unsupported; where are those diagnosed?
Fair enough, I have updated the patch to just reject any thread qualifier here.


https://reviews.llvm.org/D46022





More information about the cfe-commits mailing list