[PATCH] D16686: [OpenCL] Generate metadata for opencl_unroll_hint attribute
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 2 04:19:28 PST 2016
Anastasia added inline comments.
================
Comment at: lib/Sema/SemaStmtAttr.cpp:225
@@ +224,3 @@
+ Expr *E = A.getArgAsExpr(0);
+ assert(E != nullptr && "Invalid opencl_unroll_hint argument");
+ llvm::APSInt ArgVal(32);
----------------
pxli168 wrote:
> Is this necessary as you have checked there is only one arg in this attr?
I guess this might be the case if it's not an Expr, but not sure what else it could be. I think we probably don't need it.
================
Comment at: lib/Sema/SemaStmtAttr.cpp:230
@@ +229,3 @@
+ S.Diag(A.getLoc(), diag::err_attribute_argument_type)
+ << A.getName()->getName() << AANT_ArgumentIntegerConstant
+ << E->getSourceRange();
----------------
pxli168 wrote:
> Why there is two getName?
1st returns IdentifierInfo and 2nd actual StringRef.
http://reviews.llvm.org/D16686
More information about the cfe-commits
mailing list