From: Argyrios Kyrtzidis Date: Sat, 1 Sep 2012 19:08:08 +0000 (+0000) Subject: [libclang] Fix indexing type alias declarations. rdar://11878406 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=754a5d14d58213beb0502720e66fef8fa86a21cf;p=clang [libclang] Fix indexing type alias declarations. rdar://11878406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163072 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Index/index-file.cpp b/test/Index/index-file.cpp new file mode 100644 index 0000000000..bf2d62c556 --- /dev/null +++ b/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/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp index 7560398395..4c78f5e1b5 100644 --- a/tools/libclang/IndexDecl.cpp +++ b/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;