aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2021-02-05 07:18:48 -0500
committerAaron Ballman <aaron@aaronballman.com>2021-02-05 07:20:41 -0500
commit45ccfd9c9d0311371a8217c15c2ef3ba969a0aff (patch)
tree6cb414bc8eb1c4150547df8f69b69c967972357f /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentb40f9fb61d1064bdbdc6591146050a4d24dae9d1 (diff)
downloadllvm-45ccfd9c9d0311371a8217c15c2ef3ba969a0aff.zip
llvm-45ccfd9c9d0311371a8217c15c2ef3ba969a0aff.tar.gz
llvm-45ccfd9c9d0311371a8217c15c2ef3ba969a0aff.tar.bz2
Treat opencl_unroll_hint subject errors as semantic rather than parse errors
The attribute definition claimed the attribute was inheritable (which only applies to declaration attributes) and not a statement attribute. Further, it treats subject appertainment errors as being parse errors rather than semantic errors, which leads to us accepting invalid code. For instance, we currently fail to reject: void foo() { int i = 1000; __attribute__((nomerge, opencl_unroll_hint(8))) if (i) { foo(); } } This addresses the issues by clarifying that opencl_unroll_hint is a statement attribute and handles its appertainment checks in the semantic layer instead of the parsing layer. This changes the output of the diagnostic text to be more consistent with other appertainment errors.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions