[llvm-branch-commits] [cfe-branch] r142723 - in /cfe/branches/release_30: ./ bindings/python/clang/cindex.py bindings/python/tests/cindex/test_type.py test/SemaCXX/warn-unreachable.cpp

Bill Wendling isanbard at gmail.com
Sat Oct 22 04:36:46 PDT 2011


Author: void
Date: Sat Oct 22 06:36:45 2011
New Revision: 142723

URL: http://llvm.org/viewvc/llvm-project?rev=142723&view=rev
Log:
Merging r142476:
------------------------------------------------------------------------
r142476 | dgregor | 2011-10-18 22:50:34 -0700 (Tue, 18 Oct 2011) | 2 lines

Add TypeKind.CONSTANTARRAY, from  Anders Waldenborg!

------------------------------------------------------------------------

Modified:
    cfe/branches/release_30/   (props changed)
    cfe/branches/release_30/bindings/python/clang/cindex.py
    cfe/branches/release_30/bindings/python/tests/cindex/test_type.py
    cfe/branches/release_30/test/SemaCXX/warn-unreachable.cpp   (props changed)

Propchange: cfe/branches/release_30/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 22 06:36:45 2011
@@ -1,3 +1,3 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:142113,142133-142134,142187,142349,142474
+/cfe/trunk:142113,142133-142134,142187,142349,142474,142476
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_30/bindings/python/clang/cindex.py
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/bindings/python/clang/cindex.py?rev=142723&r1=142722&r2=142723&view=diff
==============================================================================
--- cfe/branches/release_30/bindings/python/clang/cindex.py (original)
+++ cfe/branches/release_30/bindings/python/clang/cindex.py Sat Oct 22 06:36:45 2011
@@ -1019,7 +1019,7 @@
 TypeKind.OBJCOBJECTPOINTER = TypeKind(109)
 TypeKind.FUNCTIONNOPROTO = TypeKind(110)
 TypeKind.FUNCTIONPROTO = TypeKind(111)
-
+TypeKind.CONSTANTARRAY = TypeKind(112)
 
 class Type(Structure):
     """

Modified: cfe/branches/release_30/bindings/python/tests/cindex/test_type.py
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_30/bindings/python/tests/cindex/test_type.py?rev=142723&r1=142722&r2=142723&view=diff
==============================================================================
--- cfe/branches/release_30/bindings/python/tests/cindex/test_type.py (original)
+++ cfe/branches/release_30/bindings/python/tests/cindex/test_type.py Sat Oct 22 06:36:45 2011
@@ -74,3 +74,22 @@
 
     else:
         assert False, "Didn't find teststruct??"
+
+
+constarrayInput="""
+struct teststruct {
+  void *A[2];
+};
+"""
+def testConstantArray():
+    index = Index.create()
+    tu = index.parse('t.c', unsaved_files = [('t.c',constarrayInput)])
+
+    for n in tu.cursor.get_children():
+        if n.spelling == 'teststruct':
+            fields = list(n.get_children())
+            assert fields[0].spelling == 'A'
+            assert fields[0].type.kind == TypeKind.CONSTANTARRAY
+            break
+    else:
+        assert False, "Didn't find teststruct??"

Propchange: cfe/branches/release_30/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 22 06:36:45 2011
@@ -1,2 +1,2 @@
 /cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,142113,142133-142134,142187,142349,142474
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,142113,142133-142134,142187,142349,142474,142476





More information about the llvm-branch-commits mailing list