================
@@ -22,6 +26,49 @@ class raw_ostream;
namespace clang {
namespace api_notes {
+
+std::string
+formatAPINotesParameterSelector(llvm::ArrayRef<llvm::StringRef> Parameters);
+std::string
+formatAPINotesParameterSelector(llvm::ArrayRef<std::string> Parameters);
+
+/// Stable reader-facing identity for an API notes function selector entry.
+///
+/// This mirrors the serialized function table key closely enough for Sema-side
+/// diagnostics to use it as a DenseMap key, without exposing the reader's
+/// private FunctionTableKey implementation type.
+struct APINotesFunctionSelectorKey {
+ bool IsCXXMethod = false;
----------------
StoeckOverflow wrote:
For the `IsCXXMethod` bit, I think it is useful to keep the table kind explicit
here. The call site that creates this key already knows whether it is
collecting from the function table or the C++ method table. If we remove the
bit, we would throw that information away and later need to infer it from
`ParentContextID`.
That inference might be possible in some cases by resolving context metadata,
but it would add an extra lookup and mix two separate concepts: the parent
declaration context and the APINotes table that stored the selector.
https://github.com/llvm/llvm-project/pull/209408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits