diff options
author | Carl Worth <[email protected]> | 2014-06-26 10:08:34 -0700 |
---|---|---|
committer | Carl Worth <[email protected]> | 2014-07-29 15:11:50 -0700 |
commit | 346d712e87f09b434706ee21de02860f104c1c3c (patch) | |
tree | b7914945539bd12607d22a5401a0982f5d96c46c /src/glsl/glcpp/tests/137-expand-macro-after-period.c | |
parent | 285c9392ad9c4ca862bc6f0cd4138bfc38cc3cee (diff) |
glsl/glcpp: Test that macro parameters substitute immediately after periods
At one point while rewriting the lexing rule for pre-processing numbers, I
made it a bit too aggressive and within a replacement list sucked up a
parameter name that appeared immediately after a period. This caused the
parameter name to be unreplaced when the macro was expanded.
It was in some piglit tests that I originally found this issue. Here, I'm
adding a test to "make check" to ensure that this behavior remains correct.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/tests/137-expand-macro-after-period.c')
-rw-r--r-- | src/glsl/glcpp/tests/137-expand-macro-after-period.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glcpp/tests/137-expand-macro-after-period.c b/src/glsl/glcpp/tests/137-expand-macro-after-period.c new file mode 100644 index 00000000000..c8cd47fb57e --- /dev/null +++ b/src/glsl/glcpp/tests/137-expand-macro-after-period.c @@ -0,0 +1,4 @@ +#define FIELD(x) foo.x +#define FIELD_OF(s, x) s.x +FIELD(bar) +FIELD_OF(foo, bar) |