[clang] [libclang] Add clang_CXXMethod_getQualifiers, clang_Cursor_isConstexpr, and clang_CXXMethod_isExplicitObjectMemberFunction (PR #183305)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 07:02:49 PDT 2026


================
@@ -0,0 +1,31 @@
+struct Foo {
+  void normal();
+  void c() const;
+  void v() volatile;
+  void cv() const volatile;
+  void r() __restrict;
+  void cvr() const volatile __restrict;
+  constexpr int baz() { return 1; }
+};
+constexpr int x = 42;
+int y = 1;
+
+struct Bar {
+  void explicit_const(this const Bar&);
+  void explicit_volatile(this volatile Bar&);
+  void explicit_cv(this const volatile Bar&);
+};
+
+// RUN: c-index-test -test-print-type --std=c++23 %s | FileCheck %s
+// CHECK: CXXMethod=normal:2:8 [type=void ()] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [isPOD=0]
----------------
AaronBallman wrote:

It'd be better for the RUN line to be at the top of the file and the CHECK lines after each source line being checked.

https://github.com/llvm/llvm-project/pull/183305


More information about the cfe-commits mailing list