Anastasia created this revision.
Anastasia added reviewers: rjmccall, bader, yaxunl.
Added std option for OpenCL C++, see cfe-dev thread for more details:
http://lists.llvm.org/pipermail/cfe-dev/2018-April/057535.html
Examples:
`clang -std=CL2.2 test.cl`
`clang -std=cl2.2 test.cl`
`clang -std=CLC
yaxunl added a comment.
LGTM. Thank!
https://reviews.llvm.org/D45363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bader added inline comments.
Comment at: include/clang/Frontend/LangStandards.def:167
+LANGSTANDARD_ALIAS_DEPR(opencl22, "CL2.2")
+LANGSTANDARD_ALIAS_DEPR(opencl22, "clc++")
+LANGSTANDARD_ALIAS_DEPR(opencl22, "CLC++")
OpenCL C++ 1.0 specification defines only 'c+
Anastasia updated this revision to Diff 141975.
Anastasia edited the summary of this revision.
Anastasia added a comment.
Changed to `-cl-std=c++` since it's explicitly defined in spec. We could reuse
`OpenCLVersion` in `LangOpts` but I think it might be cleaner to add separate
`OpenCLCPlusPlusV
Anastasia added inline comments.
Comment at: lib/Frontend/InitPreprocessor.cpp:434
+llvm_unreachable("Unsupported OpenCL C++ version");
+ Builder.defineMacro("__CL_CPP_VERSION_1_0__", "100");
+} else {
There is no such macro in the spec it seems,
bader accepted this revision.
bader added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
https://reviews.llvm.org/D45363
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinf
This revision was automatically updated to reflect the committed changes.
Closed by commit rL329911: [OpenCL] Added -std/-cl-std=c++ (authored by
stulova, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D45363?vs=141975&id=142171#toc
R
This revision was automatically updated to reflect the committed changes.
Closed by commit rC329911: [OpenCL] Added -std/-cl-std=c++ (authored by
stulova, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D45363
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/B