[clang] [clang-tools-extra] [Index] Reflect in SymbolSubKind whether a typedef points to a struct or a class (PR #181967)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 18 23:55:25 PST 2026


================
@@ -310,13 +332,15 @@ SymbolInfo index::getSymbolInfo(const Decl *D) {
       Info.Lang = SymbolLanguage::CXX;
       Info.Properties |= (SymbolPropertySet)SymbolProperty::Generic;
       break;
-    case Decl::TypeAlias:
+    case Decl::TypeAlias: {
       Info.Kind = SymbolKind::TypeAlias;
+      Info.SubKind = getSubKindForTypedef(cast<TypeAliasDecl>(D));
       Info.Lang = SymbolLanguage::CXX;
       break;
+    }
     case Decl::UnresolvedUsingTypename:
       Info.Kind = SymbolKind::Using;
-      Info.SubKind = SymbolSubKind::UsingTypename;
----------------
HighCommander4 wrote:

Fair point. I restored `UsingTypename`, and made `UsingClass` and `UsingStruct` both new subkinds.

https://github.com/llvm/llvm-project/pull/181967


More information about the cfe-commits mailing list