14a487fd54
The only type of expressions that getConstantSubexpression could ever return are Literal and nullptr. getConstantValue now returns an optional<double>; nullopt indicates a non-constant value in the slot. This simplifies most use cases, and allows us to get rid of some extra "zero" and "one" Literal objects in some of our Constructor classes. This change fixes a recent fuzzer issue. The fuzzer had discovered that calling `getConstantSubexpression` on a ConstructorCompoundCast that contained a compile-time-constant value would return literals of the wrong type (the cast was not applied). By nesting repeated matrix casts, this type confusion could be turned into an assertion. Change-Id: Icee69219e6db2822ffdfab4e5ccdaff54584a4b6 Bug: oss-fuzz:41000 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471376 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
5 lines
83 B
JavaScript
5 lines
83 B
JavaScript
### Compilation failed:
|
|
|
|
error: program does not contain a main() function
|
|
1 error
|