[PATCH] D20447: [OpenCL] Fixup extension list
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 11:32:47 PDT 2016
Anastasia added inline comments.
================
Comment at: test/SemaOpenCL/extension-version.cl:11
@@ +10,3 @@
+#endif
+#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers: enable
+
----------------
jvesely wrote:
> Anastasia wrote:
> > Could you use standard diagnostic check please:
> > expected-warning{{unknown OpenCL extension ...
> >
> > Similarly to SemaOpenCL/extensions.cl
> not sure I follow, the test does not trigger any diagnostics (by design).
> are you saying that I should introduce negative checks to make sure extensions are not available outside of their respective context?
> Is there a way to filter verifier tags based on clang invocation? (something like FileCheck prefix)
Exactly, you should check that the extensions are enabled correctly based on CL versions.
For example if you compile this without passing -cl-std=CL1.2:
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable
the following error is produced:
unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring
You can condition error directives on CL version passed as it's done in the example test SemaOpenCL/extensions.cl.
So what is the original intension of this tests? Not sure I understand what you are trying to test.
Repository:
rL LLVM
http://reviews.llvm.org/D20447
More information about the cfe-commits
mailing list