[clang] clang_EvalResult_getAsCXString impl (PR #134551)

Damian Andrei via cfe-commits cfe-commits at lists.llvm.org
Wed May 21 21:01:17 PDT 2025


xTachyon wrote:

We could keep `CXString` as it was before, but `const void *data` could actually point to a dynamically allocated struct that has roughly this definition:
```c
struct Data  {
    size_t length;
    char data[1];
};
```

This wouldn't change the current API, and it would still be only one allocation. What do you think?

https://github.com/llvm/llvm-project/pull/134551


More information about the cfe-commits mailing list