brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 4f7e21a Raw
102 lines · c
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 c-header %s -o %t/output.symbols.json -verify4 5// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix A6void a(void) __attribute__((availability(macos, introduced=12.0)));7// A-LABEL: "!testLabel": "c:@F@a"8// A:      "availability": [9// A-NEXT:   {10// A-NEXT:     "domain": "macos",11// A-NEXT:     "introduced": {12// A-NEXT:       "major": 12,13// A-NEXT:       "minor": 0,14// A-NEXT:       "patch": 015// A-NEXT:     }16// A-NEXT:   }17// A-NEXT: ]18 19// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix B20void b(void) __attribute__((availability(macos, introduced=11.0, deprecated=12.0, obsoleted=30.0)));21// B-LABEL: "!testLabel": "c:@F@b"22// B:      "availability": [23// B-NEXT:   {24// B-NEXT:     "deprecated": {25// B-NEXT:       "major": 12,26// B-NEXT:       "minor": 0,27// B-NEXT:       "patch": 028// B-NEXT:     },29// B-NEXT:     "domain": "macos",30// B-NEXT:     "introduced": {31// B-NEXT:       "major": 11,32// B-NEXT:       "minor": 0,33// B-NEXT:       "patch": 034// B-NEXT:     },35// B-NEXT:     "obsoleted": {36// B-NEXT:       "major": 30,37// B-NEXT:       "minor": 0,38// B-NEXT:       "patch": 039// B-NEXT:     }40// B-NEXT:   }41// B-NEXT: ]42 43// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix E44void c(void) __attribute__((availability(macos, introduced=11.0, deprecated=12.0, obsoleted=30.0))) __attribute__((availability(ios, introduced=13.0)));45// C-LABEL: "!testLabel": "c:@F@c"46// C:       "availability": [47// C-NEXT:    {48// C-NEXT:      "deprecated": {49// C-NEXT:        "major": 12,50// C-NEXT:        "minor": 0,51// C-NEXT:        "patch": 052// C-NEXT:      },53// C-NEXT:      "domain": "macos",54// C-NEXT:      "introduced": {55// C-NEXT:        "major": 11,56// C-NEXT:        "minor": 0,57// C-NEXT:        "patch": 058// C-NEXT:      },59// C-NEXT:      "obsoleted": {60// C-NEXT:        "major": 30,61// C-NEXT:        "minor": 0,62// C-NEXT:        "patch": 063// C-NEXT:      }64// C-NEXT:    }65// C-NEXT: ]66 67// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix D68void d(void) __attribute__((deprecated)) __attribute__((availability(macos, introduced=11.0)));69// D-LABEL: "!testLabel": "c:@F@d"70// D:      "availability": [71// D-NEXT:   {72// D-NEXT:     "domain": "*",73// D-NEXT:     "isUnconditionallyDeprecated": true74// D-NEXT:   },75// D-NEXT:   {76// D-NEXT:     "domain": "macos",77// D-NEXT:     "introduced": {78// D-NEXT:       "major": 11,79// D-NEXT:       "minor": 0,80// D-NEXT:       "patch": 081// D-NEXT:     }82// D-NEXT:   }83// D-NEXT: ]84 85// This symbol should be dropped as it's unconditionally unavailable86// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix E87void e(void) __attribute__((unavailable)) __attribute__((availability(macos, introduced=11.0)));88// E-NOT: "!testLabel": "c:@F@e"89 90// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix F91void f(void) __attribute__((availability(macos, unavailable)));92// F-LABEL: "!testLabel": "c:@F@f"93// F:      "availability": [94// F-NEXT:   {95// F-NEXT:     "domain": "macos",96// F-NEXT:     "isUnconditionallyUnavailable": true97// F-NEXT:   }98// F-NEXT: ]99 100// expected-no-diagnostics101 102