Skip to content

Conversation

@Rune-Magic
Copy link

Tokens and NumTokens are clearly out parameters and should be annotated as such

@github-actions
Copy link

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 is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:as-a-library libclang and C++ API labels Sep 19, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-clang

Author: Rune (Rune-Magic)

Changes

Tokens and NumTokens are clearly out parameters and should be annotated as such


Full diff: https://github.com/llvm/llvm-project/pull/159822.diff

1 Files Affected:

  • (modified) clang/include/clang-c/Index.h (+2-2)
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index be038d9165fc6..a20cf56c1a294 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -5074,11 +5074,11 @@ CINDEX_LINKAGE CXSourceRange clang_getTokenExtent(CXTranslationUnit, CXToken);
  * \param Range the source range in which text should be tokenized. All of the
  * tokens produced by tokenization will fall within this source range,
  *
- * \param Tokens this pointer will be set to point to the array of tokens
+ * \param[out] Tokens this pointer will be set to point to the array of tokens
  * that occur within the given source range. The returned pointer must be
  * freed with clang_disposeTokens() before the translation unit is destroyed.
  *
- * \param NumTokens will be set to the number of tokens in the \c *Tokens
+ * \param[out] NumTokens will be set to the number of tokens in the \c *Tokens
  * array.
  *
  */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:as-a-library libclang and C++ API clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants