IntrinsicTable: remove double underscores
'__' is reserved in C++, and the 'match__' and 'build__' functions are causing OSS-fuzz builds to fail.
Add the change in tint behavior to the OT notes.
Add end to end tests for underscores. While the GLSL and MSL compilers seem to accept leading and double underscores in identifiers, the tint build failure has highlighted we have more work to do here (crbug.com/tint/1319)
Fixed: oss-fuzz:41214
Bug: tint:1292
Bug: tint:1319
Change-Id: I32b7bf4e0cff26e678b788457f90452c2503da50
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70480
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/test/identifiers/underscore/prefix/upper/struct.wgsl.expected.msl b/test/identifiers/underscore/prefix/upper/struct.wgsl.expected.msl
new file mode 100644
index 0000000..bafed70
--- /dev/null
+++ b/test/identifiers/underscore/prefix/upper/struct.wgsl.expected.msl
@@ -0,0 +1,15 @@
+#include <metal_stdlib>
+
+using namespace metal;
+struct A {
+ int B;
+};
+struct _A {
+ int _B;
+};
+
+void f() {
+ _A const c = {};
+ int const d = c._B;
+}
+