-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expose format (attribute) info for function declarations in Clang Index API #113754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3109,6 +3109,29 @@ CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C); | |
*/ | ||
CINDEX_LINKAGE int clang_Cursor_getNumArguments(CXCursor C); | ||
|
||
/** | ||
* Retrieve FormatAttr on function declaration | ||
*/ | ||
CINDEX_LINKAGE CXCursor clang_Cursor_getFormatAttr (CXCursor cur); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to align the indentation of the arguments here (same below) |
||
|
||
/** | ||
* Retrieve string name of the type of formatting (i.e. scanf or printf) | ||
* used with clang_Cursor_getFormatAttr | ||
*/ | ||
CINDEX_LINKAGE CXString clang_FormatAttr_getType (CXCursor C); | ||
|
||
/** | ||
* Retrieve the arg location (0-based) of the template C-string | ||
* used with clang_Cursor_getFormatAttr | ||
*/ | ||
CINDEX_LINKAGE unsigned clang_FormatAttr_getFormatIdx(CXCursor C); | ||
|
||
/** | ||
* Retrieve the arg location to the first format argument | ||
* used with clang_Cursor_getFormatAttr | ||
*/ | ||
CINDEX_LINKAGE unsigned clang_FormatAttr_getFirstArg (CXCursor C); | ||
|
||
/** | ||
* Retrieve the argument cursor of a function or method. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,10 @@ LLVM_13 { | |
clang_Cursor_getMangling; | ||
clang_Cursor_getModule; | ||
clang_Cursor_getNumArguments; | ||
clang_Cursor_getFormatAttr; | ||
clang_FormatAttr_getType; | ||
clang_FormatAttr_getFormatIdx; | ||
clang_FormatAttr_getFirstArg; | ||
Comment on lines
+62
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should be inserted under the header for the next version to be released, i.e. |
||
clang_Cursor_getNumTemplateArguments; | ||
clang_Cursor_getObjCDeclQualifiers; | ||
clang_Cursor_getObjCManglings; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are unrelated changes that should remain local to your development environment