]> granicus.if.org Git - clang/commitdiff
[clang.py] Format and add documention for Type
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 20 Feb 2012 17:58:40 +0000 (17:58 +0000)
committerGregory Szorc <gregory.szorc@gmail.com>
Mon, 20 Feb 2012 17:58:40 +0000 (17:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150972 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/python/clang/cindex.py
bindings/python/tests/cindex/test_type.py

index 15948570239230668bac05299b5ecafb4cc48e30..c93d35c57b9aa9b1ec784bae6a98985bcd7d1d76 100644 (file)
@@ -1221,26 +1221,26 @@ class Type(Structure):
         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)
 
index 0ddfe4fb0a9d34d33f7be5e59f4581f5bd7f26ca..e4cd245c9cb4e5dda1750ce20e7a98ce514f84de 100644 (file)
@@ -200,6 +200,7 @@ def test_argument_types_invalid_type():
     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 @@ void bar(int a, int b);
     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 @@ def test_invalid_element_type():
     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')