summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python
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
commit07ee5c44b47d34a068ce1e9f736510a2b07902fa (patch)
tree684929abbc5d96ad66502c02563a25dab7e9d8c8 /clang/bindings/python
parentc763c22469675b7aeaae108e2c66875d4a5bedf1 (diff)
downloadbcm5719-llvm-07ee5c44b47d34a068ce1e9f736510a2b07902fa.tar.gz
bcm5719-llvm-07ee5c44b47d34a068ce1e9f736510a2b07902fa.zip
[libclang] Don't report a DecayedType as "unexposed", report it as the original (as written) type.
Patch by Anders Waldenborg! llvm-svn: 190796
Diffstat (limited to 'clang/bindings/python')
-rw-r--r--clang/bindings/python/tests/cindex/test_type.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/cindex/test_type.py b/clang/bindings/python/tests/cindex/test_type.py
index ed3d65c3789..62968d6285f 100644
--- a/clang/bindings/python/tests/cindex/test_type.py
+++ b/clang/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
OpenPOWER on IntegriCloud