From f52b4de3b29ee27213b7d60fb620a0d5d50b49f9 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 29 Nov 2022 18:17:33 -0800 Subject: Allow `no_diff` modifier on parameters (#2538) --- source/slang/slang-syntax.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-syntax.h') 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 const& paramDeclRef); + inline SubstExpr getInitExpr(ASTBuilder* astBuilder, DeclRef const& declRef) { return declRef.substitute(astBuilder, declRef.getDecl()->initExpr); -- cgit v1.2.3