[cfe-commits] r163072 - in /cfe/trunk: test/Index/index-file.cpp tools/libclang/IndexDecl.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Sat Sep 1 12:08:08 PDT 2012


Author: akirtzidis
Date: Sat Sep  1 14:08:08 2012
New Revision: 163072

URL: http://llvm.org/viewvc/llvm-project?rev=163072&view=rev
Log:
[libclang] Fix indexing type alias declarations. rdar://11878406

Added:
    cfe/trunk/test/Index/index-file.cpp
Modified:
    cfe/trunk/tools/libclang/IndexDecl.cpp

Added: cfe/trunk/test/Index/index-file.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/index-file.cpp?rev=163072&view=auto
==============================================================================
--- cfe/trunk/test/Index/index-file.cpp (added)
+++ cfe/trunk/test/Index/index-file.cpp Sat Sep  1 14:08:08 2012
@@ -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

Modified: cfe/trunk/tools/libclang/IndexDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/IndexDecl.cpp?rev=163072&r1=163071&r2=163072&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/IndexDecl.cpp (original)
+++ cfe/trunk/tools/libclang/IndexDecl.cpp Sat Sep  1 14:08:08 2012
@@ -110,7 +110,7 @@
     return true;
   }
 
-  bool VisitTypedefDecl(TypedefNameDecl *D) {
+  bool VisitTypedefNameDecl(TypedefNameDecl *D) {
     IndexCtx.handleTypedefName(D);
     IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D);
     return true;





More information about the cfe-commits mailing list