summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-01 19:08:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-01 19:08:08 +0000
commitb0b336ebe95b73038e7fdb00677209253edc4be5 (patch)
treed636587deba1e777a2fb7792d20b3baa334afb23
parentda188de2b69f6125d04e8ba8851cd9519ec457c9 (diff)
downloadbcm5719-llvm-b0b336ebe95b73038e7fdb00677209253edc4be5.tar.gz
bcm5719-llvm-b0b336ebe95b73038e7fdb00677209253edc4be5.zip
[libclang] Fix indexing type alias declarations. rdar://11878406
llvm-svn: 163072
-rw-r--r--clang/test/Index/index-file.cpp6
-rw-r--r--clang/tools/libclang/IndexDecl.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/Index/index-file.cpp b/clang/test/Index/index-file.cpp
new file mode 100644
index 00000000000..bf2d62c5568
--- /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 7560398395a..4c78f5e1b5e 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;
OpenPOWER on IntegriCloud