mesa/src/compiler
Eric R. Smith 475222b022 glcpp: prevent accidental token pasting
Explicit token pasting is handled specially, but the token
printing code can accidentally paste identifiers. Check for
this accidental pasting and prevent it by inserting a space
if necessary.

Supersedes a similar but much more limited test to prevent pasting
`+` and `-` to make `++` and `--`.

A test is provided in glcpp/tests/150-token-accidental-concatenation.
The accidental pasting test in 068-accidental-pasting is also updated
to cover some of the other cases.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37214>
2025-09-16 11:27:43 +00:00
..
clc util: Refactoring util_dl_get_path_from_proc out of clc/clc_helpers.cpp 2025-08-07 21:15:13 +00:00
glsl glcpp: prevent accidental token pasting 2025-09-16 11:27:43 +00:00
isaspec meson: do not compile libisaspec unless used 2025-03-25 08:32:47 +00:00
libcl libcl: avoid calling UNREACHABLE(str) macro without arguments 2025-08-04 23:15:18 +02:00
nir nir: remove unsigned upper bound config 2025-09-16 09:24:04 +00:00
rust nak: Move dataflow to compiler crate 2025-09-13 07:30:50 +00:00
spirv shader_info: remove gl_subgroup_size enum 2025-09-12 21:05:17 +00:00
builtin_types.py compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py compiler: Generate files with newline at end 2025-06-24 14:01:04 +00:00
glsl_types.c compiler/types: handle BFLOAT16 when decoding blob 2025-08-20 04:12:00 +00:00
glsl_types.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
list.h nir: remove unused stuff from list.h 2025-07-31 20:23:04 +00:00
meson.build nir: move list.h outside the glsl directory 2025-07-31 20:23:02 +00:00
shader_enums.c nir,spirv: Add support for SPV_ARM_core_builtins 2025-08-07 11:46:33 +02:00
shader_enums.h shader_info: remove gl_subgroup_size enum 2025-09-12 21:05:17 +00:00
shader_info.h shader_info: remove gl_subgroup_size enum 2025-09-12 21:05:17 +00:00