[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:39:13 PDT 2018


svenvh updated this revision to Diff 144098.
svenvh edited the summary of this revision.
svenvh added a comment.

Updated patch to reject any thread storage class specifier, not just `thread_local`.

Also mark the OpenCL access qualifiers as reserved keywords as per OpenCL C++ 1.0 s2.2, and add a test for those.


https://reviews.llvm.org/D46022

Files:
  include/clang/Basic/DiagnosticCommonKinds.td
  include/clang/Basic/DiagnosticParseKinds.td
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/TokenKinds.def
  include/clang/Sema/DeclSpec.h
  lib/Basic/IdentifierTable.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Parse/ParseDecl.cpp
  lib/Parse/ParseStmtAsm.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/SemaCast.cpp
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaStmt.cpp
  test/Parser/opencl-cl20.cl
  test/Parser/opencl-cxx-keywords.cl
  test/Parser/opencl-storage-class.cl
  test/SemaOpenCL/storageclass.cl
  test/SemaOpenCLCXX/restricted.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46022.144098.patch
Type: text/x-patch
Size: 27868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180426/956a2701/attachment-0001.bin>


More information about the cfe-commits mailing list