diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-02-17 01:42:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-02-17 01:42:24 +0000 |
commit | f602f96e607aa89fbfddfdff7576af33cf48dd78 (patch) | |
tree | b3c8deb7d57a5c82d61bf494b934a7469f8875ee /clang/tools/c-index-test/c-index-test.c | |
parent | d8716676ea9cea863aa87822ecb3eb9acb7a23c4 (diff) | |
download | bcm5719-llvm-f602f96e607aa89fbfddfdff7576af33cf48dd78.tar.gz bcm5719-llvm-f602f96e607aa89fbfddfdff7576af33cf48dd78.zip |
Convert clang_getCompletionChunkText() to return a CXString.
llvm-svn: 96439
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 360f75a66e0..640375aaeac 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -755,7 +755,8 @@ void print_completion_string(CXCompletionString completion_string, FILE *file) { N = clang_getNumCompletionChunks(completion_string); for (I = 0; I != N; ++I) { - const char *text = 0; + CXString text; + const char *cstr; enum CXCompletionChunkKind Kind = clang_getCompletionChunkKind(completion_string, I); @@ -769,10 +770,13 @@ void print_completion_string(CXCompletionString completion_string, FILE *file) { } text = clang_getCompletionChunkText(completion_string, I); + cstr = clang_getCString(text); fprintf(file, "{%s %s}", clang_getCompletionChunkKindSpelling(Kind), - text? text : ""); + cstr ? cstr : ""); + clang_disposeString(text); } + } void print_completion_result(CXCompletionResult *completion_result, |