pxli168 added inline comments. ================ Comment at: lib/CodeGen/CGLoopInfo.cpp:131 @@ +130,3 @@ + // equivalent LoopHintAttr enums. + // See OpenCL v2.0 s6.11.5 for details. + // 0 corresponds to opencl_unroll_hint attribute without ---------------- Can you also change this comment to the style that reference go first then summary.
================ Comment at: lib/Sema/SemaStmtAttr.cpp:224 @@ +223,3 @@ + Expr *E = A.getArgAsExpr(0); + assert(E != nullptr && "Invalid opencl_unroll_hint argument"); + llvm::APSInt ArgVal(32); ---------------- Should this assert be here? Can it be something else? And you shuold just use assert(E && ....). ================ Comment at: test/SemaOpenCL/unroll-hint.cl:1 @@ +1,2 @@ +//RUN: %clang_cc1 -O0 -cl-std=CL2.0 -fsyntax-only -verify %s + ---------------- What will happen if using OpenCL 1.2 or 1.1 that earlier than 2.0? You can also make a test for it, and can change this test case to unroll-hint-cl2.0.cl as you can see other cl2.0 features in the folder. http://reviews.llvm.org/D16686 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits