aboutsummaryrefslogtreecommitdiff
path: root/src/server/analysis.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/analysis.odin
parent2ba84dcc4e19a1b66e3c270b7391cc8ae92e97b4 (diff)
Fix issues adding ast struct comments with the temporary allocator
Diffstat (limited to 'src/server/analysis.odin')
-rw-r--r--src/server/analysis.odin2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/analysis.odin b/src/server/analysis.odin
index e2ce2a6..c1d0016 100644
--- a/src/server/analysis.odin
+++ b/src/server/analysis.odin
@@ -3294,6 +3294,8 @@ make_symbol_bit_field_from_ast :: proc(
name: string,
inlined := false,
) -> Symbol {
+ // We clone this so we don't override docs and comments with temp allocated docs and comments
+ v := cast(^ast.Bit_Field_Type)clone_node(v, ast_context.allocator, nil)
construct_bit_field_field_docs(ast_context.file, v)
symbol := Symbol {
range = common.get_token_range(v, ast_context.file.src),