Add TypeKind.CONSTANTARRAY, from Anders Waldenborg!
llvm-svn: 142476
This commit is contained in:
parent
d59d02cc38
commit
89861066ed
|
@ -1019,7 +1019,7 @@ TypeKind.OBJCINTERFACE = TypeKind(108)
|
|||
TypeKind.OBJCOBJECTPOINTER = TypeKind(109)
|
||||
TypeKind.FUNCTIONNOPROTO = TypeKind(110)
|
||||
TypeKind.FUNCTIONPROTO = TypeKind(111)
|
||||
|
||||
TypeKind.CONSTANTARRAY = TypeKind(112)
|
||||
|
||||
class Type(Structure):
|
||||
"""
|
||||
|
|
|
@ -74,3 +74,22 @@ def test_a_struct():
|
|||
|
||||
else:
|
||||
assert False, "Didn't find teststruct??"
|
||||
|
||||
|
||||
constarrayInput="""
|
||||
struct teststruct {
|
||||
void *A[2];
|
||||
};
|
||||
"""
|
||||
def testConstantArray():
|
||||
index = Index.create()
|
||||
tu = index.parse('t.c', unsaved_files = [('t.c',constarrayInput)])
|
||||
|
||||
for n in tu.cursor.get_children():
|
||||
if n.spelling == 'teststruct':
|
||||
fields = list(n.get_children())
|
||||
assert fields[0].spelling == 'A'
|
||||
assert fields[0].type.kind == TypeKind.CONSTANTARRAY
|
||||
break
|
||||
else:
|
||||
assert False, "Didn't find teststruct??"
|
||||
|
|
Loading…
Reference in New Issue