[clang] [clang-c] introduce queries on GCC-style inline assembly statements (PR #143424)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 05:54:39 PDT 2025
================
@@ -8648,6 +8646,119 @@ void clang_annotateTokens(CXTranslationUnit TU, CXToken *Tokens,
}
}
+//===----------------------------------------------------------------------===//
+// Operations for querying information of a GCC inline assembly block under a
+// cursor.
+//===----------------------------------------------------------------------===//
+CXString clang_Cursor_getGCCAssemblyTemplate(CXCursor Cursor) {
+ if (!clang_isStatement(Cursor.kind))
+ return cxstring::createEmpty();
+ if (auto const *Stmt = dyn_cast_or_null<GCCAsmStmt>(getCursorStmt(Cursor))) {
----------------
AaronBallman wrote:
`Stmt` is a type name, better to pick a name which doesn't conflict with a type (this helps folks who have editors that don't handle conflicts with type and object names for things like autocomplete). Same issue happens in a bunch of other functions as well.
https://github.com/llvm/llvm-project/pull/143424
More information about the cfe-commits
mailing list