[PATCH] D96905: Add missing fixed point literal CursorKind to cindex.py

2021-02-17 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 324470.
vabridgers added a comment.

Add test case


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96905/new/

https://reviews.llvm.org/D96905

Files:
  clang/bindings/python/clang/cindex.py
  clang/bindings/python/tests/cindex/test_cursor_kind.py


Index: clang/bindings/python/tests/cindex/test_cursor_kind.py
===
--- clang/bindings/python/tests/cindex/test_cursor_kind.py
+++ clang/bindings/python/tests/cindex/test_cursor_kind.py
@@ -23,6 +23,7 @@
 self.assertIn(CursorKind.MS_ASM_STMT, kinds)
 self.assertIn(CursorKind.MODULE_IMPORT_DECL, kinds)
 self.assertIn(CursorKind.TYPE_ALIAS_TEMPLATE_DECL, kinds)
+self.assertIn(CursorKind.FIXED_POINT_LITERAL, kinds)
 
 def test_kind_groups(self):
 """Check that every kind classifies to exactly one group."""
Index: clang/bindings/python/clang/cindex.py
===
--- clang/bindings/python/clang/cindex.py
+++ clang/bindings/python/clang/cindex.py
@@ -1084,6 +1084,9 @@
 # Represents an @available(...) check.
 CursorKind.OBJC_AVAILABILITY_CHECK_EXPR = CursorKind(148)
 
+# A fixed point literal
+CursorKind.FIXED_POINT_LITERAL = CursorKind(149)
+
 
 # A statement whose specific kind is not exposed via this interface.
 #


Index: clang/bindings/python/tests/cindex/test_cursor_kind.py
===
--- clang/bindings/python/tests/cindex/test_cursor_kind.py
+++ clang/bindings/python/tests/cindex/test_cursor_kind.py
@@ -23,6 +23,7 @@
 self.assertIn(CursorKind.MS_ASM_STMT, kinds)
 self.assertIn(CursorKind.MODULE_IMPORT_DECL, kinds)
 self.assertIn(CursorKind.TYPE_ALIAS_TEMPLATE_DECL, kinds)
+self.assertIn(CursorKind.FIXED_POINT_LITERAL, kinds)
 
 def test_kind_groups(self):
 """Check that every kind classifies to exactly one group."""
Index: clang/bindings/python/clang/cindex.py
===
--- clang/bindings/python/clang/cindex.py
+++ clang/bindings/python/clang/cindex.py
@@ -1084,6 +1084,9 @@
 # Represents an @available(...) check.
 CursorKind.OBJC_AVAILABILITY_CHECK_EXPR = CursorKind(148)
 
+# A fixed point literal
+CursorKind.FIXED_POINT_LITERAL = CursorKind(149)
+
 
 # A statement whose specific kind is not exposed via this interface.
 #
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D96905: Add missing fixed point literal CursorKind to cindex.py

2021-02-17 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers created this revision.
Herald added a subscriber: arphaman.
vabridgers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Experimenting with parsing AST from Python using cindex.py, I discovered
that a CursorKind defintion for fixed point literals was missing. This
change simply adds this defintion following the defintion in
clang/include/clang-c/Index.h


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96905

Files:
  clang/bindings/python/clang/cindex.py


Index: clang/bindings/python/clang/cindex.py
===
--- clang/bindings/python/clang/cindex.py
+++ clang/bindings/python/clang/cindex.py
@@ -1084,6 +1084,9 @@
 # Represents an @available(...) check.
 CursorKind.OBJC_AVAILABILITY_CHECK_EXPR = CursorKind(148)
 
+# A fixed point literal
+CursorKind.FIXED_POINT_LITERAL = CursorKind(149)
+
 
 # A statement whose specific kind is not exposed via this interface.
 #


Index: clang/bindings/python/clang/cindex.py
===
--- clang/bindings/python/clang/cindex.py
+++ clang/bindings/python/clang/cindex.py
@@ -1084,6 +1084,9 @@
 # Represents an @available(...) check.
 CursorKind.OBJC_AVAILABILITY_CHECK_EXPR = CursorKind(148)
 
+# A fixed point literal
+CursorKind.FIXED_POINT_LITERAL = CursorKind(149)
+
 
 # A statement whose specific kind is not exposed via this interface.
 #
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits