diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-23 23:24:18 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-23 23:24:18 +0000 |
commit | 30a2805c2c85e6abfe3149293f83f60da018b2df (patch) | |
tree | 5ec91f7955e6dc8c1240a7d3bef67af92dfda822 /test/Index/index-decls.m | |
parent | ec5a306dd4e8911f22997d84ce029affbb582132 (diff) |
[libclang] Make sure we don't crash when trying to index code that
managed to insert an @interface as top level decl contained by another
@interface.
A commit to also not allow this as valid code will be coming.
rdar://11105114.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/index-decls.m')
-rw-r--r-- | test/Index/index-decls.m | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Index/index-decls.m b/test/Index/index-decls.m index dc808ea513..9e4e620497 100644 --- a/test/Index/index-decls.m +++ b/test/Index/index-decls.m @@ -11,7 +11,13 @@ @synthesize prop = _prop; @end -// RUN: c-index-test -index-file %s | FileCheck %s +rdar://11015325 +@interface I1 +__attribute__((something)) @interface I2 @end +@end + +// RUN: c-index-test -index-file %s > %t +// RUN: FileCheck %s -input-file=%t // CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12 // CHECK: [indexDeclaration]: kind: objc-instance-method | name: prop | {{.*}} | loc: 3:2 // CHECK: [indexDeclaration]: kind: objc-property | name: prop | {{.*}} | loc: 2:25 |