[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / ExtractAPI / typedef.c
blob89df9db8b362dd1297f67b0c3d2993af848006a7
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
4 // RUN: %t/reference.output.json.in >> %t/reference.output.json
5 // RUN: %clang -extract-api --product-name=Typedef -target arm64-apple-macosx \
6 // RUN: -x objective-c-header %t/input.h -o %t/output.json | FileCheck -allow-empty %s
8 // Generator version is not consistent across test runs, normalize it.
9 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
10 // RUN: %t/output.json >> %t/output-normalized.json
11 // RUN: diff %t/reference.output.json %t/output-normalized.json
13 // CHECK-NOT: error:
14 // CHECK-NOT: warning:
16 //--- input.h
17 typedef int MyInt;
19 //--- reference.output.json.in
21 "metadata": {
22 "formatVersion": {
23 "major": 0,
24 "minor": 5,
25 "patch": 3
27 "generator": "?"
29 "module": {
30 "name": "Typedef",
31 "platform": {
32 "architecture": "arm64",
33 "operatingSystem": {
34 "minimumVersion": {
35 "major": 11,
36 "minor": 0,
37 "patch": 0
39 "name": "macosx"
41 "vendor": "apple"
44 "relationships": [],
45 "symbols": [
47 "accessLevel": "public",
48 "declarationFragments": [
50 "kind": "keyword",
51 "spelling": "typedef"
54 "kind": "text",
55 "spelling": " "
58 "kind": "typeIdentifier",
59 "preciseIdentifier": "c:I",
60 "spelling": "int"
63 "kind": "text",
64 "spelling": " "
67 "kind": "identifier",
68 "spelling": "MyInt"
71 "kind": "text",
72 "spelling": ";"
75 "identifier": {
76 "interfaceLanguage": "objective-c",
77 "precise": "c:input.h@T@MyInt"
79 "kind": {
80 "displayName": "Type Alias",
81 "identifier": "objective-c.typealias"
83 "location": {
84 "position": {
85 "character": 13,
86 "line": 1
88 "uri": "file://INPUT_DIR/input.h"
90 "names": {
91 "navigator": [
93 "kind": "identifier",
94 "spelling": "MyInt"
97 "subHeading": [
99 "kind": "identifier",
100 "spelling": "MyInt"
103 "title": "MyInt"
105 "pathComponents": [
106 "MyInt"
108 "type": "c:I"