[clang] 80ae366 - [clang][extract-api] Emit "navigator" property of "name" in SymbolGraph

Daniel Grumberg via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 8 09:29:10 PDT 2022


Author: Daniel Grumberg
Date: 2022-04-08T17:29:00+01:00
New Revision: 80ae366592924c8a32f81f96b316595ec90ec672

URL: https://github.com/llvm/llvm-project/commit/80ae366592924c8a32f81f96b316595ec90ec672
DIFF: https://github.com/llvm/llvm-project/commit/80ae366592924c8a32f81f96b316595ec90ec672.diff

LOG: [clang][extract-api] Emit "navigator" property of "name" in SymbolGraph

Differential Revision: https://reviews.llvm.org/D123391

Added: 
    

Modified: 
    clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
    clang/test/ExtractAPI/enum.c
    clang/test/ExtractAPI/global_record.c
    clang/test/ExtractAPI/global_record_multifile.c
    clang/test/ExtractAPI/known_files_only.c
    clang/test/ExtractAPI/known_files_only_hmap.c
    clang/test/ExtractAPI/language.c
    clang/test/ExtractAPI/macro_undefined.c
    clang/test/ExtractAPI/macros.c
    clang/test/ExtractAPI/objc_category.m
    clang/test/ExtractAPI/objc_interface.m
    clang/test/ExtractAPI/objc_protocol.m
    clang/test/ExtractAPI/struct.c
    clang/test/ExtractAPI/typedef.c
    clang/test/ExtractAPI/typedef_anonymous_record.c
    clang/test/ExtractAPI/typedef_chain.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index efe3c276671da..2a3818e0da520 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -14,6 +14,7 @@
 #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"
@@ -331,6 +332,12 @@ Object serializeNames(const APIRecord &Record) {
   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;
 }

diff  --git a/clang/test/ExtractAPI/enum.c b/clang/test/ExtractAPI/enum.c
index a9646e21cc8f1..60f69059c942f 100644
--- a/clang/test/ExtractAPI/enum.c
+++ b/clang/test/ExtractAPI/enum.c
@@ -161,6 +161,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Vehicle"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -197,6 +203,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Bicycle"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -234,6 +246,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Car"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -288,6 +306,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Train"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -325,6 +349,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Ship"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -362,6 +392,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Airplane"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -416,6 +452,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Direction"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -452,6 +494,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "North"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -489,6 +537,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "East"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -526,6 +580,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "South"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -563,6 +623,12 @@ enum Direction : unsigned char {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "West"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/global_record.c b/clang/test/ExtractAPI/global_record.c
index dfe99c2f55f67..1722c03eb47f9 100644
--- a/clang/test/ExtractAPI/global_record.c
+++ b/clang/test/ExtractAPI/global_record.c
@@ -86,6 +86,12 @@ char unavailable __attribute__((unavailable));
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "num"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -365,6 +371,12 @@ char unavailable __attribute__((unavailable));
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "add"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/global_record_multifile.c b/clang/test/ExtractAPI/global_record_multifile.c
index 577eb121cf922..4d6566506a226 100644
--- a/clang/test/ExtractAPI/global_record_multifile.c
+++ b/clang/test/ExtractAPI/global_record_multifile.c
@@ -88,6 +88,12 @@ char unavailable __attribute__((unavailable));
         "uri": "file://INPUT_DIR/input1.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "num"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -367,6 +373,12 @@ char unavailable __attribute__((unavailable));
         "uri": "file://INPUT_DIR/input2.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "add"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/known_files_only.c b/clang/test/ExtractAPI/known_files_only.c
index 4f1d75b05fc97..6baba4e7d921e 100644
--- a/clang/test/ExtractAPI/known_files_only.c
+++ b/clang/test/ExtractAPI/known_files_only.c
@@ -84,6 +84,12 @@ struct Foo { int a; };
         "uri": "file://INPUT_DIR/input1.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "num"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/known_files_only_hmap.c b/clang/test/ExtractAPI/known_files_only_hmap.c
index f213287975d06..d5d06e65aa6f9 100644
--- a/clang/test/ExtractAPI/known_files_only_hmap.c
+++ b/clang/test/ExtractAPI/known_files_only_hmap.c
@@ -103,6 +103,12 @@ struct Foo { int a; };
         "uri": "file://INPUT_DIR/subdir/subdir1/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "num"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -148,6 +154,12 @@ struct Foo { int a; };
         "uri": "file://INPUT_DIR/subdir/subdir2/known_file.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "known_num"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/language.c b/clang/test/ExtractAPI/language.c
index df182cf07819e..7effe75807d48 100644
--- a/clang/test/ExtractAPI/language.c
+++ b/clang/test/ExtractAPI/language.c
@@ -88,6 +88,12 @@ char objc;
         "uri": "file://INPUT_DIR/c.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "c"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -162,6 +168,12 @@ char objc;
         "uri": "file://INPUT_DIR/objc.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "objc"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/macro_undefined.c b/clang/test/ExtractAPI/macro_undefined.c
index 0ae04d02e1543..9eee8ebb22f0f 100644
--- a/clang/test/ExtractAPI/macro_undefined.c
+++ b/clang/test/ExtractAPI/macro_undefined.c
@@ -95,6 +95,12 @@ FUNC_GEN(bar, const int *, unsigned);
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "foo"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -241,6 +247,12 @@ FUNC_GEN(bar, const int *, unsigned);
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "bar"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -285,6 +297,12 @@ FUNC_GEN(bar, const int *, unsigned);
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "HELLO"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/macros.c b/clang/test/ExtractAPI/macros.c
index 867b0aed00619..eb8e3f2b8e3aa 100644
--- a/clang/test/ExtractAPI/macros.c
+++ b/clang/test/ExtractAPI/macros.c
@@ -80,6 +80,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "HELLO"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -124,6 +130,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "WORLD"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -180,6 +192,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MACRO_FUN"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -252,6 +270,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "FUN"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -308,6 +332,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "FUNC99"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -364,6 +394,12 @@
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "FUNGNU"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/objc_category.m b/clang/test/ExtractAPI/objc_category.m
index 20eefdfbb00e5..af5a44ff5b424 100644
--- a/clang/test/ExtractAPI/objc_category.m
+++ b/clang/test/ExtractAPI/objc_category.m
@@ -105,6 +105,12 @@ + (void)ClassMethod;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Interface"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -158,6 +164,12 @@ + (void)ClassMethod;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "InstanceMethod"
+          }
+        ],
         "subHeading": [
           {
             "kind": "text",
@@ -216,6 +228,12 @@ + (void)ClassMethod;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "ClassMethod"
+          }
+        ],
         "subHeading": [
           {
             "kind": "text",
@@ -302,6 +320,12 @@ + (void)ClassMethod;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Property"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/objc_interface.m b/clang/test/ExtractAPI/objc_interface.m
index 5ca6404683987..fc42cfc7c6728 100644
--- a/clang/test/ExtractAPI/objc_interface.m
+++ b/clang/test/ExtractAPI/objc_interface.m
@@ -19,6 +19,7 @@ @protocol Protocol;
 @interface Super <Protocol>
 @property(readonly, getter=getProperty) unsigned Property;
 + (id)getWithProperty:(unsigned) Property;
+- (void)setProperty:(unsigned) Property andOtherThing: (unsigned) Thing;
 @end
 
 @interface Derived : Super {
@@ -58,6 +59,11 @@ - (char)getIvar;
       "source": "c:objc(cs)Super(cm)getWithProperty:",
       "target": "c:objc(cs)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",
@@ -117,6 +123,12 @@ - (char)getIvar;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Super"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -186,6 +198,12 @@ - (char)getIvar;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "getWithProperty:"
+          }
+        ],
         "subHeading": [
           {
             "kind": "text",
@@ -203,6 +221,112 @@ - (char)getIvar;
         "getWithProperty:"
       ]
     },
+    {
+      "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": [
@@ -272,6 +396,12 @@ - (char)getIvar;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Property"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -321,11 +451,17 @@ - (char)getIvar;
       "location": {
         "position": {
           "character": 12,
-          "line": 8
+          "line": 9
         },
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Derived"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -366,11 +502,17 @@ - (char)getIvar;
       "location": {
         "position": {
           "character": 8,
-          "line": 9
+          "line": 10
         },
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Ivar"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -420,11 +562,17 @@ - (char)getIvar;
       "location": {
         "position": {
           "character": 1,
-          "line": 11
+          "line": 12
         },
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "getIvar"
+          }
+        ],
         "subHeading": [
           {
             "kind": "text",

diff  --git a/clang/test/ExtractAPI/objc_protocol.m b/clang/test/ExtractAPI/objc_protocol.m
index cffb0ed55d54e..28cc0c3a73df4 100644
--- a/clang/test/ExtractAPI/objc_protocol.m
+++ b/clang/test/ExtractAPI/objc_protocol.m
@@ -85,6 +85,12 @@ @protocol AnotherProtocol <Protocol>
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Protocol"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -142,6 +148,12 @@ @protocol AnotherProtocol <Protocol>
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "AnotherProtocol"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/struct.c b/clang/test/ExtractAPI/struct.c
index ec03d84493b05..38f55c19119e3 100644
--- a/clang/test/ExtractAPI/struct.c
+++ b/clang/test/ExtractAPI/struct.c
@@ -120,6 +120,12 @@ struct Color {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Color"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -165,6 +171,12 @@ struct Color {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Red"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -211,6 +223,12 @@ struct Color {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Green"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -257,6 +275,12 @@ struct Color {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Blue"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -320,6 +344,12 @@ struct Color {
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "Alpha"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/typedef.c b/clang/test/ExtractAPI/typedef.c
index 95a4a3d9663a9..4d1fd01566fdd 100644
--- a/clang/test/ExtractAPI/typedef.c
+++ b/clang/test/ExtractAPI/typedef.c
@@ -84,6 +84,12 @@ typedef int MyInt;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyInt"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/typedef_anonymous_record.c b/clang/test/ExtractAPI/typedef_anonymous_record.c
index 80eff7cd14062..5444239fe3464 100644
--- a/clang/test/ExtractAPI/typedef_anonymous_record.c
+++ b/clang/test/ExtractAPI/typedef_anonymous_record.c
@@ -85,6 +85,12 @@ typedef MyStructStruct MyStructStructStruct;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyStruct"
+          }
+        ],
         "title": "MyStruct"
       },
       "pathComponents": [
@@ -132,6 +138,12 @@ typedef MyStructStruct MyStructStructStruct;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyStructStruct"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -186,6 +198,12 @@ typedef MyStructStruct MyStructStructStruct;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyStructStructStruct"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",

diff  --git a/clang/test/ExtractAPI/typedef_chain.c b/clang/test/ExtractAPI/typedef_chain.c
index 52f2f75f0ded8..42a78d1d541cf 100644
--- a/clang/test/ExtractAPI/typedef_chain.c
+++ b/clang/test/ExtractAPI/typedef_chain.c
@@ -86,6 +86,12 @@ typedef MyIntInt MyIntIntInt;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyInt"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -140,6 +146,12 @@ typedef MyIntInt MyIntIntInt;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyIntInt"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",
@@ -194,6 +206,12 @@ typedef MyIntInt MyIntIntInt;
         "uri": "file://INPUT_DIR/input.h"
       },
       "names": {
+        "navigator": [
+          {
+            "kind": "identifier",
+            "spelling": "MyIntIntInt"
+          }
+        ],
         "subHeading": [
           {
             "kind": "identifier",


        


More information about the cfe-commits mailing list