brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.1 KiB · 3d9f953 Raw
176 lines · plain
1// RUN: rm -rf %t2// RUN: %clang_cc1 -extract-api --pretty-sgf --emit-sgf-symbol-labels-for-testing -triple arm64-apple-macosx \3// RUN:   -x objective-c-header %s -o %t/output.symbols.json -verify4 5 6// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix A7__attribute__((availability(macos, introduced=9.0, deprecated=12.0, obsoleted=30.0)))8@interface A9// A-LABEL: "!testLabel": "c:objc(cs)A"10// A:      "availability": [11// A-NEXT:   {12// A-NEXT:     "deprecated": {13// A-NEXT:       "major": 12,14// A-NEXT:       "minor": 0,15// A-NEXT:       "patch": 016// A-NEXT:     }17// A-NEXT:     "domain": "macos"18// A-NEXT:     "introduced": {19// A-NEXT:       "major": 9,20// A-NEXT:       "minor": 0,21// A-NEXT:       "patch": 022// A-NEXT:     }23// A-NEXT:     "obsoleted": {24// A-NEXT:       "major": 30,25// A-NEXT:       "minor": 0,26// A-NEXT:       "patch": 027// A-NEXT:     }28// A-NEXT:   }29// A-NEXT: ]30 31// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CP32@property(class) int CP;33// CP-LABEL: "!testLabel": "c:objc(cs)A(cpy)CP"34// CP:      "availability": [35// CP-NEXT:   {36// CP-NEXT:     "deprecated": {37// CP-NEXT:       "major": 12,38// CP-NEXT:       "minor": 0,39// CP-NEXT:       "patch": 040// CP-NEXT:     }41// CP-NEXT:     "domain": "macos"42// CP-NEXT:     "introduced": {43// CP-NEXT:       "major": 9,44// CP-NEXT:       "minor": 0,45// CP-NEXT:       "patch": 046// CP-NEXT:     }47// CP-NEXT:     "obsoleted": {48// CP-NEXT:       "major": 30,49// CP-NEXT:       "minor": 0,50// CP-NEXT:       "patch": 051// CP-NEXT:     }52// CP-NEXT:   }53// CP-NEXT: ]54 55// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix IP56@property int IP;57// IP-LABEL: "!testLabel": "c:objc(cs)A(py)IP"58// IP:      "availability": [59// IP-NEXT:   {60// IP-NEXT:     "deprecated": {61// IP-NEXT:       "major": 12,62// IP-NEXT:       "minor": 0,63// IP-NEXT:       "patch": 064// IP-NEXT:     }65// IP-NEXT:     "domain": "macos"66// IP-NEXT:     "introduced": {67// IP-NEXT:       "major": 9,68// IP-NEXT:       "minor": 0,69// IP-NEXT:       "patch": 070// IP-NEXT:     }71// IP-NEXT:     "obsoleted": {72// IP-NEXT:       "major": 30,73// IP-NEXT:       "minor": 0,74// IP-NEXT:       "patch": 075// IP-NEXT:     }76// IP-NEXT:   }77// IP-NEXT: ]78 79// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix MR80@property int moreRestrictive __attribute__((availability(macos, introduced=10.0, deprecated=11.0, obsoleted=29.0)));81// MR-LABEL: "!testLabel": "c:objc(cs)A(py)moreRestrictive"82// MR:      "availability": [83// MR-NEXT:   {84// MR-NEXT:     "deprecated": {85// MR-NEXT:       "major": 11,86// MR-NEXT:       "minor": 0,87// MR-NEXT:       "patch": 088// MR-NEXT:     }89// MR-NEXT:     "domain": "macos"90// MR-NEXT:     "introduced": {91// MR-NEXT:       "major": 10,92// MR-NEXT:       "minor": 0,93// MR-NEXT:       "patch": 094// MR-NEXT:     }95// MR-NEXT:     "obsoleted": {96// MR-NEXT:       "major": 29,97// MR-NEXT:       "minor": 0,98// MR-NEXT:       "patch": 099// MR-NEXT:     }100// MR-NEXT:   }101// MR-NEXT: ]102 103@end104 105// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix B106__attribute__((deprecated("B is deprecated")))107@interface B108// B-LABEL: "!testLabel": "c:objc(cs)B"109// B:      "availability": [110// B-NEXT:   {111// B-NEXT:     "domain": "*"112// B-NEXT:     "isUnconditionallyDeprecated": true113// B-NEXT:   }114// B-NEXT: ]115 116// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix BIP117@property int BIP;118// BIP-LABEL: "!testLabel": "c:objc(cs)B(py)BIP"119// BIP:      "availability": [120// BIP-NEXT:   {121// BIP-NEXT:     "domain": "*"122// BIP-NEXT:     "isUnconditionallyDeprecated": true123// BIP-NEXT:   }124// BIP-NEXT: ]125@end126 127// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix C128__attribute__((availability(macos, unavailable)))129@interface C130// C-LABEL: "!testLabel": "c:objc(cs)C"131// C:      "availability": [132// C-NEXT:   {133// C-NEXT:     "domain": "macos"134// C-NEXT:     "isUnconditionallyUnavailable": true135// C-NEXT:   }136// C-NEXT: ]137 138// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix CIP139@property int CIP;140// CIP-LABEL: "!testLabel": "c:objc(cs)C(py)CIP"141// CIP:      "availability": [142// CIP-NEXT:   {143// CIP-NEXT:     "domain": "macos"144// CIP-NEXT:     "isUnconditionallyUnavailable": true145// CIP-NEXT:   }146// CIP-NEXT: ]147@end148 149@interface D150// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix DIP151@property int DIP __attribute__((availability(macos, introduced=10.0, deprecated=11.0, obsoleted=29.0)));152// DIP-LABEL: "!testLabel": "c:objc(cs)D(py)DIP"153// DIP:      "availability": [154// DIP-NEXT:   {155// DIP-NEXT:     "deprecated": {156// DIP-NEXT:       "major": 11,157// DIP-NEXT:       "minor": 0,158// DIP-NEXT:       "patch": 0159// DIP-NEXT:     }160// DIP-NEXT:     "domain": "macos"161// DIP-NEXT:     "introduced": {162// DIP-NEXT:       "major": 10,163// DIP-NEXT:       "minor": 0,164// DIP-NEXT:       "patch": 0165// DIP-NEXT:     }166// DIP-NEXT:     "obsoleted": {167// DIP-NEXT:       "major": 29,168// DIP-NEXT:       "minor": 0,169// DIP-NEXT:       "patch": 0170// DIP-NEXT:     }171// DIP-NEXT:   }172// DIP-NEXT: ]173@end174 175// expected-no-diagnostics176