[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: It does not look nice for memory usage, but I don't know how critical it's here. It's it's unacceptable, then `__attribute__((no_sanitize("memory")))` is an option. https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mai

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes We can't guaranty that underlying string is 0-terminated and [String.size()] is even in the same allocation. --- Full diff: https://github.com/llvm/llvm-project/pull/125020.diff 1 Files Affected: - (mod

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/125020 We can't guaranty that underlying string is 0-terminated and [String.size()] is even in the same allocation. >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: W