[PATCH] D65286: [OpenCL] Allow OpenCL C style vector initialization in C++
Marco Antognini via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 30 05:28:06 PDT 2019
mantognini added a comment.
In `vector_literals_nested.cl`, we have tests for (global) constants. Do you think it would be worth testing those as well in C++ mode? Maybe the two files (`vector_literals_nested.cl` and `vector_literals_valid.cl`) should also be merged as most of their content seems duplicated.
In C++, we have the comma operator and therefore the AST is significantly different. Running the content of your test file with `-x c++` shows that it is rejected as desired. It could be worth having a negative test to ensure we always reject this in vanilla C++.
Regarding the code itself, I'm not familiar with `InitializationSequence`/`InitListChecker` that much, but the patch makes sense I would say.
CHANGES SINCE LAST ACTION
More information about the cfe-commits