summaryrefslogtreecommitdiff
path: root/source/slang/slang-ast-type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
-rw-r--r--source/slang/slang-ast-type.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp
index 9704b4c87..f80de86fd 100644
--- a/source/slang/slang-ast-type.cpp
+++ b/source/slang/slang-ast-type.cpp
@@ -796,4 +796,14 @@ Type* removeParamDirType(Type* type)
return type;
}
+bool isNonCopyableType(Type* type)
+{
+ auto declRefType = as<DeclRefType>(type);
+ if (!declRefType)
+ return false;
+ if (declRefType->getDeclRef().getDecl()->findModifier<NonCopyableTypeAttribute>())
+ return true;
+ return false;
+}
+
} // namespace Slang