diff options
author | Erik Faye-Lund <kusmabite@gmail.com> | 2013-12-17 16:37:33 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2014-01-02 15:57:41 -0800 |
commit | b8be00e5f203cdf8a69d7283e6fdc872e80cf5c9 (patch) | |
tree | ee6e354e9e4c7f112ef92d928f023a3e2f2b5762 /src/gtest/src | |
parent | 347f1493320e1bc2194c70d4d66bfe2b5883bf1e (diff) |
glcpp: error on multiple #else/#elif directives
The preprocessor currently accepts multiple else/elif-groups
per if-section. The GLSL-preprocessor is defined by the C++
specification, which defines the following parse-rule:
if-section:
if-group elif-groups(opt) else-group(opt) endif-line
This clearly only allows a single else-group, that has to come
after any elif-groups.
So let's modify the code to follow the specification. Add test
to prevent regressions.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Carl Worth <cworth@cworth.org>
Cc: 10.0 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit eb212c5a302f0122a13b36dfdf07e91f951ae2e7)
Diffstat (limited to 'src/gtest/src')
0 files changed, 0 insertions, 0 deletions