AaronBallman wrote:

> `CXString::private_flags` only has 2 bits used. Could we use the rest for the 
> size? Would it be enough?

I'd be a bit uncomfortable with that. It would work, but it means we're never 
able to add any new private flags in the future.

> There's also the possibility to not touch `CXString` at all, and add a 
> function that returns ptr+size only for `clang_EvalResult_getAs...`.

What if we add `unsigned clang_getCStringLength(CXString);` which gets the 
length but not the contents? Do we need to package pointer and size together?

https://github.com/llvm/llvm-project/pull/134551
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to