This website requires JavaScript.
ReeceSX
Explore
Aurora
Register
Sign In
AuroraMiddleware
/
skia2
Watch
1
Star
0
Fork
0
You've already forked skia2
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
6a10556775
skia2
/
tests
/
sksl
/
errors
/
IncompleteExpression.glsl
5 lines
88 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Report incomplete expression-statements as errors. Previously, a dangling type or function reference would be eliminated silently with optimizations on, or would assert when optimizations were off. Change-Id: Ib2e273b6f069724e8872c9cb97351b647b875a62 Bug: skia:12472 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469525 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-09 21:29:13 +00:00
### Compilation failed:
Add test for incomplete expressions. The ExpressionStatement currently eliminates dangling references without reporting them as an error. This happens due to optimization; these expressions (being meaningless) have no side effects, and so the optimizer replaces them with Nop. When the optimizer is off, these programs trigger an assert: https://osscs.corp.google.com/skia/skia/+/main:src/sksl/SkSLAnalysis.cpp;l=582;drc=e7a953524787e3bd0c437ec52de4e40986689825 A followup CL will fix ExpressionStatements so that they report incomplete expressions as an error. Change-Id: Ica49166032e670749fc1b4e7a869fbab03364d4f Bug: skia:12472 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469524 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
2021-11-09 21:25:46 +00:00
Report incomplete expression-statements as errors. Previously, a dangling type or function reference would be eliminated silently with optimizations on, or would assert when optimizations were off. Change-Id: Ib2e273b6f069724e8872c9cb97351b647b875a62 Bug: skia:12472 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/469525 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
2021-11-09 21:29:13 +00:00
error: 2: expected '(' to begin constructor invocation
Improve parser behavior with invalid statements inside a Block. Previously, when the parser found a bad statement inside a Block, it would stop processing that Block entirely. This caused our brace matching to fall out of balance. block() would normally only return once the Block's closing brace was consumed, but in this case, the closing brace would still be in the parse stream awaiting consumption even though block() had returned. Now, when a bad statement is found inside a Block, we just ignore it and continue processing. (I tried injecting a poisoned statement as well, to see if it would affect the test results, but they were identical.) This seems to generate somewhat better errors. Change-Id: I8dc781d5602bf99d7610f8280cde8b7c1925cb65 Bug: skia:12868 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506463 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-09 21:01:32 +00:00
1 error
Reference in New Issue
Copy Permalink