[PATCH] D22170: [OpenCL] Fixes opencl.cl testcase issues and cl-strict-aliasing only allowed with cl-std=CL

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 12 08:49:00 PDT 2016


Anastasia added inline comments.

================
Comment at: test/Frontend/opencl-blocks.cl:9
@@ -8,1 +8,3 @@
 // RUN: %clang_cc1 %s -triple amdgcn--amdhsa -x c -std=c99 -verify -fsyntax-only
+// RUN: %clang_cc1 -cl-std=CL1.1 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION11 %s
+// RUN: %clang_cc1 -cl-std=CL1.2 -cl-strict-aliasing %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID-OPENCL-VERSION12 %s
----------------
yaxunl wrote:
> ashi1 wrote:
> > yaxunl wrote:
> > > Anastasia wrote:
> > > > yaxunl wrote:
> > > > > Better separate these tests to another file, e.g. cl-strict-aliasing.cl
> > > > I think it was right to have this in test/Driver/opencl.cl. Why was it moved in here?
> > > This is a frontend option and the warning is emitted by frontend, not the driver. The driver does not consume the option. It just passes it to the frontend.
> > > 
> > > The driver test is mostly testing whether the option is correctly passed to the compiler invocation by using -###.
> > should it be called opencl-strict-aliasing.cl or cl-strict-aliasing.cl
> either is OK.
I would rather see fewer small test files populated and more compact/less fragmented testing. Is there any reason not put this with blocks and give it more generic name, let's say opencl.cl.


Repository:
  rL LLVM

http://reviews.llvm.org/D22170





More information about the cfe-commits mailing list