Add basic error checks for switch and case
Check that the case labels have constant scalar integers, and that switch
statements are initialized with scalar integers. Also check that case and
default labels do not exist outside switch statements. Allow break
statements inside switch statements.
Tested by manually disabling shading language version checks for switch
in a Chromium build and checking that the expected errors are generated.
BUG=angle:921
Change-Id: Ibe83d0db52958c493ded5640d4babf670dc02d55
Reviewed-on: https://chromium-review.googlesource.com/251523Reviewed-by:
Zhenyao Mo <zmo@chromium.org>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Tested-by:
Olli Etuaho <oetuaho@nvidia.com>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment