diff options
| author | Yong He <yonghe@outlook.com> | 2025-02-20 14:48:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-20 14:48:51 -0800 |
| commit | 19867ffca6dca7995c799354081219c9e76f13d1 (patch) | |
| tree | b9153428fc8b7b6f3069931cf816ad374a2e7c52 /source/slang/slang-ast-builder.cpp | |
| parent | 9580e311e0cefb0f8e11afc316783a67201654eb (diff) | |
Simplify implicit cast ctors for vector & matrix. (#6408)
* Simplify implicit cast ctors for vector & matrix.
* Fix formatting.
* Fix tests.
* Fix Falcor test.
* Mark __builtin_cast as internal.
Diffstat (limited to 'source/slang/slang-ast-builder.cpp')
| -rw-r--r-- | source/slang/slang-ast-builder.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-ast-builder.cpp b/source/slang/slang-ast-builder.cpp index 6ffaee7db..b3afa5310 100644 --- a/source/slang/slang-ast-builder.cpp +++ b/source/slang/slang-ast-builder.cpp @@ -948,6 +948,14 @@ SubtypeWitness* ASTBuilder::getConjunctionSubtypeWitness( return witness; } +TypeCoercionWitness* ASTBuilder::getTypeCoercionWitness( + Type* subType, + Type* superType, + DeclRef<Decl> declRef) +{ + return getOrCreate<TypeCoercionWitness>(subType, superType, declRef.declRefBase); +} + DeclRef<Decl> _getMemberDeclRef(ASTBuilder* builder, DeclRef<Decl> parent, Decl* decl) { return builder->getMemberDeclRef(parent, decl); |
