Use the semantic spelling (an enum) rather than a string, to determine what access qualifier is used.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Sema/SemaType.cpp | ||
---|---|---|
1211–1212 | Since we're updating this, can you change attrs to Attrs, and maybe make it a const AttributeList *? | |
1224 | The caller can no longer tell the difference between a real-only OpenCL access attribute and no OpenCL access attribute. I know that this was the effective behavior of the original code, but that's specific to the current use case, so I think this change is a tiny regression in the semantics. | |
1629 | Just checking, but, has this situation already been diagnosed elsewhere? |
Fixed a latent infinite loop bug in 'getImageAccess', it was dereferencing Attrs, instead of Next.
LGTM, with one minor nit.
lib/Sema/SemaType.cpp | ||
---|---|---|
1629 | 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. |
Committed as r287100.
test/SemaOpenCL/access-qualifier.cl | ||
---|---|---|
71 | This was an unintentional test change, and was not committed. |
Since we're updating this, can you change attrs to Attrs, and maybe make it a const AttributeList *?