@@ -52,6 +54,12 @@ typedef struct {
* to `std::string::c_str()`.
*/
CINDEX_LINKAGE const char *clang_getCString(CXString string);
+/**
+ * This function behaves the same as clang_getCString, except that it also
+ * returns the size through the length parameter. The length par
https://github.com/xTachyon updated
https://github.com/llvm/llvm-project/pull/134551
>From 88a7517918ff8f6a5521527e9e1a141af09035c5 Mon Sep 17 00:00:00 2001
From: Andrei Damian
Date: Sun, 6 Apr 2025 19:55:59 +0300
Subject: [PATCH 1/3] clang_EvalResult_getAsCXString impl
---
clang/include/clan
https://github.com/xTachyon updated
https://github.com/llvm/llvm-project/pull/134551
>From 88a7517918ff8f6a5521527e9e1a141af09035c5 Mon Sep 17 00:00:00 2001
From: Andrei Damian
Date: Sun, 6 Apr 2025 19:55:59 +0300
Subject: [PATCH 1/2] clang_EvalResult_getAsCXString impl
---
clang/include/clan
https://github.com/AaronBallman commented:
> 1 Is size_t appropriate here? I see some functions using unsigned, and some
> using size_t.
I think it's an appropriate type to use (`unsigned` would also be fine, but I
tend to prefer `size_t` for this sort of use, personally).
> 2 On this new fl
@@ -52,6 +54,7 @@ typedef struct {
* to `std::string::c_str()`.
*/
CINDEX_LINKAGE const char *clang_getCString(CXString string);
+CINDEX_LINKAGE const char *clang_getCString2(CXString string, size_t *length);
AaronBallman wrote:
We should document that `leng
@@ -14,6 +14,7 @@
#ifndef LLVM_CLANG_C_CXSTRING_H
#define LLVM_CLANG_C_CXSTRING_H
+#include
AaronBallman wrote:
Better to put this at the end of the include list; that leaves less chance for
those headers to accidentally transitively include stddef.h withou
https://github.com/AaronBallman edited
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
https://github.com/xTachyon updated
https://github.com/llvm/llvm-project/pull/134551
>From 88a7517918ff8f6a5521527e9e1a141af09035c5 Mon Sep 17 00:00:00 2001
From: Andrei Damian
Date: Sun, 6 Apr 2025 19:55:59 +0300
Subject: [PATCH] clang_EvalResult_getAsCXString impl
---
clang/include/clang-c/
xTachyon wrote:
@AaronBallman :smile:
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
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Damian Andrei (xTachyon)
Changes
Tries to implement #69749.
>From Discord:
`
In terms of how to solve it... I'm hoping we can extend CXString to be
length-aware and then add an interface that returns a CXString object instead.
Perhaps cl
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
https://github.com/xTachyon created
https://github.com/llvm/llvm-project/pull/134551
Tries to implement #69749.
>From Discord:
`
In terms of how to solve it... I'm hoping we can extend CXString to be
length-aware and then add an interface that returns a CXString object instead.
Perhaps clang_
12 matches
Mail list logo