[clang] [clang] Move `AvailabilityInfo` into AST library (PR #81897)

Cyndy Ishida via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 15 15:46:39 PST 2024


================
@@ -57,6 +58,57 @@ class AvailabilitySpec {
   bool isOtherPlatformSpec() const { return Version.empty(); }
 };
 
+class Decl;
+
+/// Storage of availability attributes for a declaration.
+struct AvailabilityInfo {
+  /// The domain is the platform for which this availability info applies to.
+  llvm::SmallString<32> Domain;
----------------
cyndyishida wrote:

In fear I may have misunderstood your question, I give alternative answers. 
* There is not a default template argument for SmallString 
* For why I picked `32`, `31` characters is the longest string value under inputs and outputs for [mapping platform availability](https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/Attr.td#L984)


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


More information about the cfe-commits mailing list