diff --git a/clang/test/Index/index-file.cpp b/clang/test/Index/index-file.cpp new file mode 100644 index 000000000000..bf2d62c55680 --- /dev/null +++ b/clang/test/Index/index-file.cpp @@ -0,0 +1,6 @@ +using MyTypeAlias = int; + +// RUN: c-index-test -index-file %s > %t +// RUN: FileCheck %s -input-file=%t + +// CHECK: [indexDeclaration]: kind: type-alias | name: MyTypeAlias | {{.*}} | loc: 1:7 diff --git a/clang/tools/libclang/IndexDecl.cpp b/clang/tools/libclang/IndexDecl.cpp index 7560398395a5..4c78f5e1b5ef 100644 --- a/clang/tools/libclang/IndexDecl.cpp +++ b/clang/tools/libclang/IndexDecl.cpp @@ -110,7 +110,7 @@ public: return true; } - bool VisitTypedefDecl(TypedefNameDecl *D) { + bool VisitTypedefNameDecl(TypedefNameDecl *D) { IndexCtx.handleTypedefName(D); IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D); return true;