Skip to content

Commit 508748d

Browse files
authored
[libclang/python] Fix OpenMP and OpenACC CursorKinds name format (#160295)
Missing `CursorKind`s that were added in #143264 follow the name format of Index.h instead of those in cindex.py. Adapt the names accordingly.
1 parent fb67737 commit 508748d

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

clang/bindings/python/clang/cindex.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,13 +1435,13 @@ def is_unexposed(self):
14351435
OMP_SCOPE_DIRECTIVE = 306
14361436

14371437
# OpenMP reverse directive.
1438-
OMPReverseDirective = 307
1438+
OMP_REVERSE_DIRECTIVE = 307
14391439

14401440
# OpenMP interchange directive.
1441-
OMPInterchangeDirective = 308
1441+
OMP_INTERCHANGE_DIRECTIVE = 308
14421442

14431443
# OpenMP assume directive.
1444-
OMPAssumeDirective = 309
1444+
OMP_ASSUME_DIRECTIVE = 309
14451445

14461446
# OpenMP stripe directive.
14471447
OMP_STRIPE_DIRECTIVE = 310
@@ -1450,43 +1450,43 @@ def is_unexposed(self):
14501450
OPEN_ACC_COMPUTE_DIRECTIVE = 320
14511451

14521452
# OpenACC Loop Construct.
1453-
OpenACCLoopConstruct = 321
1453+
OPEN_ACC_LOOP_CONSTRUCT = 321
14541454

14551455
# OpenACC Combined Constructs.
1456-
OpenACCCombinedConstruct = 322
1456+
OPEN_ACC_COMBINED_CONSTRUCT = 322
14571457

14581458
# OpenACC data Construct.
1459-
OpenACCDataConstruct = 323
1459+
OPEN_ACC_DATA_CONSTRUCT = 323
14601460

14611461
# OpenACC enter data Construct.
1462-
OpenACCEnterDataConstruct = 324
1462+
OPEN_ACC_ENTER_DATA_CONSTRUCT = 324
14631463

14641464
# OpenACC exit data Construct.
1465-
OpenACCExitDataConstruct = 325
1465+
OPEN_ACC_EXIT_DATA_CONSTRUCT = 325
14661466

14671467
# OpenACC host_data Construct.
1468-
OpenACCHostDataConstruct = 326
1468+
OPEN_ACC_HOST_DATA_CONSTRUCT = 326
14691469

14701470
# OpenACC wait Construct.
1471-
OpenACCWaitConstruct = 327
1471+
OPEN_ACC_WAIT_CONSTRUCT = 327
14721472

14731473
# OpenACC init Construct.
1474-
OpenACCInitConstruct = 328
1474+
OPEN_ACC_INIT_CONSTRUCT = 328
14751475

14761476
# OpenACC shutdown Construct.
1477-
OpenACCShutdownConstruct = 329
1477+
OPEN_ACC_SHUTDOWN_CONSTRUCT = 329
14781478

14791479
# OpenACC set Construct.
1480-
OpenACCSetConstruct = 330
1480+
OPEN_ACC_SET_CONSTRUCT = 330
14811481

14821482
# OpenACC update Construct.
1483-
OpenACCUpdateConstruct = 331
1483+
OPEN_ACC_UPDATE_CONSTRUCT = 331
14841484

14851485
# OpenACC atomic Construct.
1486-
OpenACCAtomicConstruct = 332
1486+
OPEN_ACC_ATOMIC_CONSTRUCT = 332
14871487

14881488
# OpenACC cache Construct.
1489-
OpenACCCacheConstruct = 333
1489+
OPEN_ACC_CACHE_CONSTRUCT = 333
14901490

14911491
###
14921492
# Other Kinds

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,9 @@ Sanitizers
580580

581581
Python Binding Changes
582582
----------------------
583-
- Exposed `clang_getCursorLanguage` via `Cursor.language`.
583+
- Exposed ``clang_getCursorLanguage`` via ``Cursor.language``.
584+
- Add all missing ``CursorKind``s, ``TypeKind``s and
585+
``ExceptionSpecificationKind``s from ``Index.h``
584586

585587
OpenMP Support
586588
--------------

0 commit comments

Comments
 (0)