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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 15 09:32:28 PST 2016


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!"); \
+    } \
----------------
joey wrote:
> aaron.ballman wrote:
> > Just checking, but, has this situation already been diagnosed elsewhere?
> Maybe I should actually replace this with an llvm_unreachable?
I would remove the `default` label entirely; the switch is now fully covered, so if we remove the label, we can get a diagnostic if a new spelling is added and we forget to update this `switch`.


Repository:
  rL LLVM

https://reviews.llvm.org/D26668





More information about the cfe-commits mailing list