From: Argyrios Kyrtzidis Date: Fri, 20 Jan 2012 01:38:51 +0000 (+0000) Subject: [libclang] Fix crash when indexing attributes, rdar://10702250. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0b28928a715c423b3471c539f1d5499b405c0ec9;p=clang [libclang] Fix crash when indexing attributes, rdar://10702250. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148524 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Index/index-attrs.m b/test/Index/index-attrs.m new file mode 100644 index 0000000000..1609b0fa52 --- /dev/null +++ b/test/Index/index-attrs.m @@ -0,0 +1,7 @@ +@class Foo; +@interface Bar +@property (retain) __attribute__((iboutletcollection(Foo))) Foo *prop; +@end + +// RUN: c-index-test -index-file %s | FileCheck %s +// CHECK: : attribute(iboutletcollection)= [IBOutletCollection=ObjCInterface] diff --git a/tools/libclang/IndexingContext.cpp b/tools/libclang/IndexingContext.cpp index 1c58d23f54..3d70144db5 100644 --- a/tools/libclang/IndexingContext.cpp +++ b/tools/libclang/IndexingContext.cpp @@ -49,7 +49,7 @@ IndexingContext::ObjCProtocolListInfo::ObjCProtocolListInfo( IBOutletCollectionInfo::IBOutletCollectionInfo( const IBOutletCollectionInfo &other) - : AttrInfo(CXIdxAttr_IBOutletCollection, other.cursor, other.loc, A) { + : AttrInfo(CXIdxAttr_IBOutletCollection, other.cursor, other.loc, other.A) { IBCollInfo.attrInfo = this; IBCollInfo.classCursor = other.IBCollInfo.classCursor;