[cfe-commits] r150972 - in /cfe/trunk/bindings/python: clang/cindex.py tests/cindex/test_type.py
Gregory Szorc
gregory.szorc at gmail.com
Mon Feb 20 09:58:40 PST 2012
Author: gps
Date: Mon Feb 20 11:58:40 2012
New Revision: 150972
URL: http://llvm.org/viewvc/llvm-project?rev=150972&view=rev
Log:
[clang.py] Format and add documention for Type
Modified:
cfe/trunk/bindings/python/clang/cindex.py
cfe/trunk/bindings/python/tests/cindex/test_type.py
Modified: cfe/trunk/bindings/python/clang/cindex.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/clang/cindex.py?rev=150972&r1=150971&r2=150972&view=diff
==============================================================================
--- cfe/trunk/bindings/python/clang/cindex.py (original)
+++ cfe/trunk/bindings/python/clang/cindex.py Mon Feb 20 11:58:40 2012
@@ -1221,26 +1221,26 @@
return Type_get_canonical(self)
def is_const_qualified(self):
- """
- Determine whether a Type has the "const" qualifier set,
- without looking through typedefs that may have added "const"
+ """Determine whether a Type has the "const" qualifier set.
+
+ This does not look through typedefs that may have added "const"
at a different level.
"""
return Type_is_const_qualified(self)
def is_volatile_qualified(self):
- """
- Determine whether a Type has the "volatile" qualifier set,
- without looking through typedefs that may have added
- "volatile" at a different level.
+ """Determine whether a Type has the "volatile" qualifier set.
+
+ This does not look through typedefs that may have added "volatile"
+ at a different level.
"""
return Type_is_volatile_qualified(self)
def is_restrict_qualified(self):
- """
- Determine whether a Type has the "restrict" qualifier set,
- without looking through typedefs that may have added
- "restrict" at a different level.
+ """Determine whether a Type has the "restrict" qualifier set.
+
+ This does not look through typedefs that may have added "restrict" at
+ a different level.
"""
return Type_is_restrict_qualified(self)
Modified: cfe/trunk/bindings/python/tests/cindex/test_type.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/cindex/test_type.py?rev=150972&r1=150971&r2=150972&view=diff
==============================================================================
--- cfe/trunk/bindings/python/tests/cindex/test_type.py (original)
+++ cfe/trunk/bindings/python/tests/cindex/test_type.py Mon Feb 20 11:58:40 2012
@@ -200,6 +200,7 @@
i.type.argument_types()
def test_is_pod():
+ """Ensure Type.is_pod() works."""
tu = get_tu('int i; void f();')
i = get_cursor(tu, 'i')
f = get_cursor(tu, 'f')
@@ -232,6 +233,7 @@
assert not bar.type.is_function_variadic()
def test_element_type():
+ """Ensure Type.element_type works."""
tu = get_tu('int i[5];')
i = get_cursor(tu, 'i')
assert i is not None
@@ -248,6 +250,7 @@
i.element_type
def test_element_count():
+ """Ensure Type.element_count works."""
tu = get_tu('int i[5]; int j;')
i = get_cursor(tu, 'i')
j = get_cursor(tu, 'j')
More information about the cfe-commits
mailing list