#include "clang/ExtractAPI/Serialization/SymbolGraphSerializer.h"
#include "clang/Basic/Version.h"
#include "clang/ExtractAPI/API.h"
+#include "clang/ExtractAPI/DeclarationFragments.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/VersionTuple.h"
Names["title"] = Record.Name;
serializeArray(Names, "subHeading",
serializeDeclarationFragments(Record.SubHeading));
+ DeclarationFragments NavigatorFragments;
+ NavigatorFragments.append(Record.Name,
+ DeclarationFragments::FragmentKind::Identifier,
+ /*PreciseIdentifier*/ "");
+ serializeArray(Names, "navigator",
+ serializeDeclarationFragments(NavigatorFragments));
return Names;
}
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Vehicle"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Bicycle"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Car"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Train"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Ship"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Airplane"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Direction"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "North"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "East"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "South"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "West"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "num"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "add"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input1.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "num"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input2.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "add"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input1.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "num"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/subdir/subdir1/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "num"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/subdir/subdir2/known_file.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "known_num"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/c.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "c"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/objc.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "objc"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "foo"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "bar"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "HELLO"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "HELLO"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "WORLD"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MACRO_FUN"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "FUN"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "FUNC99"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "FUNGNU"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Interface"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "InstanceMethod"
+ }
+ ],
"subHeading": [
{
"kind": "text",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "ClassMethod"
+ }
+ ],
"subHeading": [
{
"kind": "text",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Property"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
@interface Super <Protocol>
@property(readonly, getter=getProperty) unsigned Property;
+ (id)getWithProperty:(unsigned) Property;
+- (void)setProperty:(unsigned) Property andOtherThing: (unsigned) Thing;
@end
@interface Derived : Super {
},
{
"kind": "memberOf",
+ "source": "c:objc(cs)Super(im)setProperty:andOtherThing:",
+ "target": "c:objc(cs)Super"
+ },
+ {
+ "kind": "memberOf",
"source": "c:objc(cs)Super(py)Property",
"target": "c:objc(cs)Super"
},
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Super"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "getWithProperty:"
+ }
+ ],
"subHeading": [
{
"kind": "text",
"accessLevel": "public",
"declarationFragments": [
{
+ "kind": "text",
+ "spelling": "- ("
+ },
+ {
+ "kind": "typeIdentifier",
+ "preciseIdentifier": "c:v",
+ "spelling": "void"
+ },
+ {
+ "kind": "text",
+ "spelling": ") "
+ },
+ {
+ "kind": "identifier",
+ "spelling": "setProperty:"
+ },
+ {
+ "kind": "text",
+ "spelling": "("
+ },
+ {
+ "kind": "typeIdentifier",
+ "preciseIdentifier": "c:i",
+ "spelling": "unsigned int"
+ },
+ {
+ "kind": "text",
+ "spelling": ") "
+ },
+ {
+ "kind": "internalParam",
+ "spelling": "Property"
+ },
+ {
+ "kind": "text",
+ "spelling": " "
+ },
+ {
+ "kind": "identifier",
+ "spelling": "andOtherThing:"
+ },
+ {
+ "kind": "text",
+ "spelling": "("
+ },
+ {
+ "kind": "typeIdentifier",
+ "preciseIdentifier": "c:i",
+ "spelling": "unsigned int"
+ },
+ {
+ "kind": "text",
+ "spelling": ") "
+ },
+ {
+ "kind": "internalParam",
+ "spelling": "Thing"
+ },
+ {
+ "kind": "text",
+ "spelling": ";"
+ }
+ ],
+ "identifier": {
+ "interfaceLanguage": "objective-c",
+ "precise": "c:objc(cs)Super(im)setProperty:andOtherThing:"
+ },
+ "kind": {
+ "displayName": "Instance Method",
+ "identifier": "objective-c.method"
+ },
+ "location": {
+ "position": {
+ "character": 1,
+ "line": 6
+ },
+ "uri": "file://INPUT_DIR/input.h"
+ },
+ "names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "setProperty:andOtherThing:"
+ }
+ ],
+ "subHeading": [
+ {
+ "kind": "text",
+ "spelling": "- "
+ },
+ {
+ "kind": "identifier",
+ "spelling": "setProperty:andOtherThing:"
+ }
+ ],
+ "title": "setProperty:andOtherThing:"
+ },
+ "pathComponents": [
+ "Super",
+ "setProperty:andOtherThing:"
+ ]
+ },
+ {
+ "accessLevel": "public",
+ "declarationFragments": [
+ {
"kind": "keyword",
"spelling": "@property"
},
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Property"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"location": {
"position": {
"character": 12,
- "line": 8
+ "line": 9
},
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Derived"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"location": {
"position": {
"character": 8,
- "line": 9
+ "line": 10
},
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Ivar"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"location": {
"position": {
"character": 1,
- "line": 11
+ "line": 12
},
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "getIvar"
+ }
+ ],
"subHeading": [
{
"kind": "text",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Protocol"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "AnotherProtocol"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Color"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Red"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Green"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Blue"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "Alpha"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyInt"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyStruct"
+ }
+ ],
"title": "MyStruct"
},
"pathComponents": [
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyStructStruct"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyStructStructStruct"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyInt"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyIntInt"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",
"uri": "file://INPUT_DIR/input.h"
},
"names": {
+ "navigator": [
+ {
+ "kind": "identifier",
+ "spelling": "MyIntIntInt"
+ }
+ ],
"subHeading": [
{
"kind": "identifier",