[clang] [APINotes] Add Where.Object selectors for C++ methods (PR #216148)
John Hui via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 17 01:10:58 PDT 2026
================
@@ -0,0 +1,96 @@
+---
+Name: WhereObjectQualifiers
+Tags:
+- Name: ObjectBuilder
+ Methods:
+ - Name: buildRef
+ Where:
+ Object:
+ Ref: lvalue
+ SwiftName: buildFromLValue()
+ - Name: buildRef
+ Where:
+ Parameters: []
+ Object:
+ Ref: rvalue
+ SwiftName: buildFromRValue()
+ - Name: buildConst
+ Where:
+ Parameters: []
+ Object:
+ Const: false
+ Ref: lvalue
+ SwiftName: buildMutableLValue()
+ - Name: buildConst
+ Where:
+ Parameters: []
+ Object:
+ Const: true
+ Ref: lvalue
+ SwiftName: buildConstLValue()
+ - Name: buildVolatile
+ Where:
+ Parameters: []
+ Object:
+ Volatile: false
+ SwiftName: buildNonVolatile()
+ - Name: buildVolatile
+ Where:
+ Parameters: []
+ Object:
+ Volatile: true
+ SwiftName: buildVolatile()
+ - Name: buildNone
+ Where:
+ Parameters: []
+ Object:
+ Ref: none
+ SwiftName: buildUnqualified()
+ - Name: buildCombined
+ Where:
+ Parameters: []
+ Object:
+ Const: true
+ Volatile: true
+ Ref: lvalue
+ SwiftName: buildConstVolatileLValue()
+ - Name: buildConstRValue
+ Where:
+ Parameters: []
+ Object:
+ Const: true
+ Ref: rvalue
+ SwiftName: buildConstRValue()
+ - Name: buildVolatileRValue
+ Where:
+ Parameters: []
+ Object:
+ Volatile: true
+ Ref: rvalue
+ SwiftName: buildVolatileRValue()
+ - Name: buildObjectOnly
+ Where:
+ Object:
+ Ref: lvalue
+ SwiftName: buildObjectOnlyLValue(_:)
+ - Name: buildStatic
+ Where:
+ Parameters: []
+ Object:
----------------
j-hui wrote:
I wonder whether any `Object` field should be allowed at all for static methods, since there's nothing ever to qualify.
And perhaps a static method should be qualified as `Object: none` or `Object: static` or `Static: true`? (This should be future work though.)
https://github.com/llvm/llvm-project/pull/216148
More information about the cfe-commits
mailing list