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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to