summaryrefslogtreecommitdiff
path: root/source/slang/slang-syntax.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-11-29 18:17:33 -0800
committerGitHub <noreply@github.com>2022-11-29 18:17:33 -0800
commitf52b4de3b29ee27213b7d60fb620a0d5d50b49f9 (patch)
treed4570c53045bca8e9411e884b0905d9384430a58 /source/slang/slang-syntax.h
parentf5581786a1891cedb165adb1afe71fe34f26e030 (diff)
Allow `no_diff` modifier on parameters (#2538)
Diffstat (limited to 'source/slang/slang-syntax.h')
-rw-r--r--source/slang/slang-syntax.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang/slang-syntax.h b/source/slang/slang-syntax.h
index 2ceb7a9fd..441dcb8e7 100644
--- a/source/slang/slang-syntax.h
+++ b/source/slang/slang-syntax.h
@@ -106,6 +106,10 @@ namespace Slang
return declRef.substitute(astBuilder, declRef.getDecl()->type.Ptr());
}
+ /// same as getType, but take into account the additional type modifiers from the parameter's modifier list
+ /// and return a ModifiedType if such modifiers exist.
+ Type* getParamType(ASTBuilder* astBuilder, DeclRef<VarDeclBase> const& paramDeclRef);
+
inline SubstExpr<Expr> getInitExpr(ASTBuilder* astBuilder, DeclRef<VarDeclBase> const& declRef)
{
return declRef.substitute(astBuilder, declRef.getDecl()->initExpr);