Hash :
8e9dc1a6
Author :
Date :
2024-11-19T11:08:31
Validate anonymous struct names with namespace
Consider GLSL:
struct { vec4 e; } g;
struct sbbf { vec4 f; };
The struct name validation would fail if user chosen struct name would
clash with a symbol name that ANGLE internally gave to an anonymous
struct.
Fix by importing Name abstraction from MSL backend. A symbol name is
a pair (namespace, string).
Move operator<<(std::ostream &os, const ImmutableString &str)
to sh namespace because that is more natural for operator overloading
name resolution. MSVC works with this.
Bug: angleproject:379758201
Change-Id: Icc9b02aa8cb532e1d925e2fba4c45468f01b9144
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6035029
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
{
"src/compiler/translator/ImmutableString_autogen.cpp":
"aa5791d78395d37c360b37287fda4982",
"src/compiler/translator/Operator_autogen.h":
"41096b767b263dd73172a0f0cbead070",
"src/compiler/translator/SymbolTable_autogen.cpp":
"d909b4df713767b4e6f036bda9b71c58",
"src/compiler/translator/SymbolTable_autogen.h":
"36d32dd6e9e1111a1a04d3e64fddf8d0",
"src/compiler/translator/builtin_function_declarations.txt":
"3437c12b12ddee21115a214689c6b532",
"src/compiler/translator/builtin_variables.json":
"e1995c9828b7943e47dc2846c2d071c0",
"src/compiler/translator/gen_builtin_symbols.py":
"c9d46e6222ed3595f46954ea48419b2c",
"src/compiler/translator/tree_util/BuiltIn_autogen.h":
"427aed0586c4ac38de9bb63b9c263bed",
"src/tests/compiler_tests/ImmutableString_test_autogen.cpp":
"731f4a94c4b92e9cdf95085094fc3110"
}