Skip to content

Commit

Permalink
For redefinitions, check also cursor.kind
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Oct 28, 2023
1 parent 409a8e5 commit 09fca5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cparser_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(self, translation_unit: TranslationUnit, builder: HeaderBuilder):
continue

# Check for redefinitions
if name in self.cursor_kinds: # Redefinition
if name in self.cursor_kinds and cursor.kind == self.cursor_kinds[name]: # Redefinition
prev = self.cursors[cursor.kind][name]
if cursor.kind == CursorKind.STRUCT_DECL:
assert prev.kind == CursorKind.STRUCT_DECL
Expand Down

0 comments on commit 09fca5d

Please sign in to comment.