summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-09-16 17:26:23 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-09-16 17:26:23 +0000
commit7a97f7bc619752d09998a9c31c7574b51f04ba1e (patch)
tree261bb68e0d7a77a2872c5acf9553a92c79f98525 /bindings
parent585c84c5afd91f57b84b0236aa28620438cfe636 (diff)
[libclang] Don't report a DecayedType as "unexposed", report it as the original (as written) type.
Patch by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r--bindings/python/tests/cindex/test_type.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bindings/python/tests/cindex/test_type.py b/bindings/python/tests/cindex/test_type.py
index ed3d65c378..62968d6285 100644
--- a/bindings/python/tests/cindex/test_type.py
+++ b/bindings/python/tests/cindex/test_type.py
@@ -369,3 +369,13 @@ struct Test {
assert teststruct.type.get_offset("bar") == bar
+def test_decay():
+ """Ensure decayed types are handled as the original type"""
+
+ tu = get_tu("void foo(int a[]);")
+ foo = get_cursor(tu, 'foo')
+ a = foo.type.argument_types()[0]
+
+ assert a.kind == TypeKind.INCOMPLETEARRAY
+ assert a.element_type.kind == TypeKind.INT
+ assert a.get_canonical().kind == TypeKind.INCOMPLETEARRAY