summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-09-03 16:11:10 +0000
committerManuel Klimek <klimek@google.com>2015-09-03 16:11:10 +0000
commite0495d987cd438bd37ff2a9b0b6d450943cbd7e2 (patch)
treeaea5768e1b0a20d814cfebdb82944d9cde6ecc34 /clang/bindings/python
parent01c4a45c51d517042fb009eae93c1d8e1a275bfd (diff)
downloadbcm5719-llvm-e0495d987cd438bd37ff2a9b0b6d450943cbd7e2.tar.gz
bcm5719-llvm-e0495d987cd438bd37ff2a9b0b6d450943cbd7e2.zip
[libclang] Return deduced type for auto type, not the one written in the source.
It used to work, but was accidentally broken by r179769. The issue with decayed types was fixed by r190796. So this patch partially reverts r179769, and adds more tests. This also fixes PR 18669. Patch by Sergey Kalinichev. llvm-svn: 246778
Diffstat (limited to 'clang/bindings/python')
-rw-r--r--clang/bindings/python/tests/cindex/test_type.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/bindings/python/tests/cindex/test_type.py b/clang/bindings/python/tests/cindex/test_type.py
index f3dadf999bd..f2184338be4 100644
--- a/clang/bindings/python/tests/cindex/test_type.py
+++ b/clang/bindings/python/tests/cindex/test_type.py
@@ -134,7 +134,7 @@ def test_equal():
def test_type_spelling():
"""Ensure Type.spelling works."""
- tu = get_tu('int c[5]; int i[]; int x; int v[x];')
+ tu = get_tu('int c[5]; void f(int i[]); int x; int v[x];')
c = get_cursor(tu, 'c')
i = get_cursor(tu, 'i')
x = get_cursor(tu, 'x')
@@ -253,7 +253,7 @@ void bar(int a, int b);
def test_element_type():
"""Ensure Type.element_type works."""
- tu = get_tu('int c[5]; int i[]; int x; int v[x];')
+ tu = get_tu('int c[5]; void f(int i[]); int x; int v[x];')
c = get_cursor(tu, 'c')
i = get_cursor(tu, 'i')
v = get_cursor(tu, 'v')
OpenPOWER on IntegriCloud