================
@@ -4885,6 +4893,37 @@ CINDEX_LINKAGE unsigned clang_EnumDecl_isScoped(CXCursor 
C);
  */
 CINDEX_LINKAGE unsigned clang_CXXMethod_isConst(CXCursor C);
 
+/**
+ * Set of qualifiers (const, volatile, __restrict) of a C++ member function
+ * or member function template.
+ */
+typedef struct {
+  unsigned Const : 1;
+  unsigned Volatile : 1;
+  unsigned Restrict : 1;
+  unsigned /*Reserved for other qualifiers*/ : 29;
+} CXQualifiers;
+
+/**
+ * Retrieve the set of qualifiers for a C++ member function or member
+ * function template.
+ *
+ * If the cursor does not refer to a C++ member function or member function
+ * template, a zero-initialized CXQualifiers is returned.
+ *
+ * For explicit object member functions (C++23), this returns zero-initialized
+ * CXQualifiers. Use \c clang_CXXMethod_isExplicitObjectMemberFunction to
+ * distinguish explicit from implicit object member functions.
----------------
AaronBallman wrote:

I think it'd make sense to put a comment on `clang_CXXMethod_isConst` pointing 
users to this more general interface and we can "soft" deprecate that function 
by commenting that its use is discouraged.

https://github.com/llvm/llvm-project/pull/183305
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to