[PATCH] D85429: [OpenCL] Allow for variadic macros in C++ for OpenCL
Ole Strohm via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 06:02:06 PDT 2020
olestrohm created this revision.
olestrohm added a reviewer: Anastasia.
olestrohm added a project: clang.
Herald added subscribers: cfe-commits, yaxunl.
olestrohm requested review of this revision.
C++ for OpenCL intends to support variadic macros, a decision motivated by OpenCL 3.0. This patch simply skips the warning when compiling in C++ for OpenCL mode.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85429
Files:
clang/lib/Lex/PPDirectives.cpp
Index: clang/lib/Lex/PPDirectives.cpp
===================================================================
--- clang/lib/Lex/PPDirectives.cpp
+++ clang/lib/Lex/PPDirectives.cpp
@@ -2394,7 +2394,7 @@
diag::ext_variadic_macro);
// OpenCL v1.2 s6.9.e: variadic macros are not supported.
- if (LangOpts.OpenCL) {
+ if (LangOpts.OpenCL && !LangOpts.OpenCLCPlusPlus) {
Diag(Tok, diag::ext_pp_opencl_variadic_macros);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85429.283584.patch
Type: text/x-patch
Size: 463 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200806/7e0a0375/attachment-0001.bin>
More information about the cfe-commits
mailing list