[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-16 Thread Joey Gouly via cfe-commits
joey closed this revision. joey added a comment. Committed as r287100. Comment at: test/SemaOpenCL/access-qualifier.cl:71 + +#if __OPENCL_C_VERSION__ >= 200 +void myPipeWrite(write_only pipe int); // expected-note {{passing argument to parameter here}} This wa

[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-15 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, with one minor nit. Comment at: lib/Sema/SemaType.cpp:1629 + Result = Context.Id##ROTy; break; \ +default: assert(0 && "Unknown access attribute!

[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-15 Thread Joey Gouly via cfe-commits
joey marked an inline comment as done. joey added inline comments. Comment at: lib/Sema/SemaType.cpp:1224 } - return ""; + return OpenCLAccessAttr::Keyword_read_only; } aaron.ballman wrote: > The caller can no longer tell the difference between a real-only

[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-15 Thread Joey Gouly via cfe-commits
joey updated this revision to Diff 78017. joey added a comment. Fixed a latent infinite loop bug in 'getImageAccess', it was dereferencing Attrs, instead of Next. Repository: rL LLVM https://reviews.llvm.org/D26668 Files: lib/Sema/SemaType.cpp test/SemaOpenCL/access-qualifier.cl test/

[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-15 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaType.cpp:1212 -static StringRef getImageAccessAttrStr(AttributeList *attrs) { +static OpenCLAccessAttr::Spelling getImageAccessAttr(AttributeList *attrs) { if (attrs) { Since we're updating this,

[PATCH] D26668: [OpenCL] Minor cleanup to access attributes on images

2016-11-15 Thread Joey Gouly via cfe-commits
joey created this revision. joey added a subscriber: cfe-commits. joey set the repository for this revision to rL LLVM. Herald added a subscriber: yaxunl. Use the semantic spelling (an enum) rather than a string, to determine what access qualifier is used. Repository: rL LLVM https://reviews