[clang] [clang][ExtractAPI] Compute inherited availability information (PR #103040)
Daniel Grumberg via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 02:28:36 PDT 2024
================
@@ -0,0 +1,149 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -triple arm64-apple-macosx \
+// RUN: -x objective-c-header %s -o %t/output.symbols.json -verify
+
+
+// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix A
+__attribute__((availability(macos, introduced=9.0, deprecated=12.0, obsoleted=20.0)))
+ at interface A
----------------
daniel-grumberg wrote:
It walks DeclContext's upwards to find one to compute the most restrictive information. If the are no other annotations for that platform walking upwards then it is just the one in the availability annotation. I realized that the existing availability test case doesn't cover this, thanks for pointing it out I will add a test to validate this behavior.
https://github.com/llvm/llvm-project/pull/103040
More information about the cfe-commits
mailing list