================
@@ -1112,6 +1113,58 @@ void 
APINotesSelectorDiagnosticReaderState::markCandidatesUsed(
   }
 }
 
+static api_notes::FunctionObjectSelector
+getAPINotesObjectSelector(const CXXMethodDecl *Method) {
+  api_notes::FunctionObjectSelector Selector;
+  Selector.Const = Method->isConst();
+  Selector.Volatile = Method->isVolatile();
+  switch (Method->getRefQualifier()) {
+  case RQ_None:
+    Selector.Ref = api_notes::FunctionObjectRefQualifier::None;
+    break;
+  case RQ_LValue:
+    Selector.Ref = api_notes::FunctionObjectRefQualifier::LValue;
+    break;
+  case RQ_RValue:
+    Selector.Ref = api_notes::FunctionObjectRefQualifier::RValue;
+    break;
+  }
+  return Selector;
+}
+
+static void getAPINotesObjectSelectorSubsets(
+    api_notes::FunctionObjectSelector ObjectSelector,
+    SmallVectorImpl<api_notes::FunctionObjectSelector> &Subsets) {
+  enum ObjectSelectorField : unsigned {
+    ConstField = 1u << 0,
+    VolatileField = 1u << 1,
+    RefField = 1u << 2,
----------------
j-hui wrote:

Sorry if I'm confusing this for something else, but don't we need to account 
for both lvalue and rvalue reference qualifiers here?

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

Reply via email to