]> granicus.if.org Git - clang/commitdiff
[libclang] Fix indexing type alias declarations. rdar://11878406
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 1 Sep 2012 19:08:08 +0000 (19:08 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 1 Sep 2012 19:08:08 +0000 (19:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163072 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/index-file.cpp [new file with mode: 0644]
tools/libclang/IndexDecl.cpp

diff --git a/test/Index/index-file.cpp b/test/Index/index-file.cpp
new file mode 100644 (file)
index 0000000..bf2d62c
--- /dev/null
@@ -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
index 7560398395a54a86baf970128f8654c2ea8de172..4c78f5e1b5efde018416ce84605de75b138bd4cc 100644 (file)
@@ -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;