aboutsummaryrefslogtreecommitdiff
path: root/src/server/clone.odin
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-18 20:58:46 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-18 21:07:42 -0400
commit8935def41b78130df63fd27a143f15224b2e9b04 (patch)
treeebef8b7d5ac3eb3b15d9642ec8caddc25e44e6e3 /src/server/clone.odin
parent2ba84dcc4e19a1b66e3c270b7391cc8ae92e97b4 (diff)
Fix issues adding ast struct comments with the temporary allocator
Diffstat (limited to 'src/server/clone.odin')
-rw-r--r--src/server/clone.odin5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/clone.odin b/src/server/clone.odin
index c73ccb9..7f5a1cb 100644
--- a/src/server/clone.odin
+++ b/src/server/clone.odin
@@ -318,7 +318,10 @@ clone_calling_convention :: proc(
switch v in cc {
case string:
- return get_index_unique_string(unique_strings, allocator, v)
+ if unique_strings != nil {
+ return get_index_unique_string(unique_strings, allocator, v)
+ }
+ return strings.clone(v, allocator)
case ast.Proc_Calling_Convention_Extra:
return v
}