Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions tests/test_va_list_tag_removal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
__code = os.linesep.join(['struct a{};'])
known_typedefs = ["__int128_t", "__uint128_t", "__builtin_va_list"]
known_typedefs_llvm39 = known_typedefs + ["__builtin_ms_va_list"]
known_classes = ["a", "__va_list_tag"]
known_classes = ["a"]
known_classes_llvm39 = known_classes + ["__NSConstantString_tag"]


Expand All @@ -48,9 +48,6 @@ def test_keep_va_list_tag():
variables = [
i for i in decls if isinstance(i, declarations.variable_t)]

tag = "__va_list_tag"

assert tag in [class_.name for class_ in classes]
assert "a" in [class_.name for class_ in classes]
if len(classes) == 2:
for c in known_classes:
Expand All @@ -60,7 +57,6 @@ def test_keep_va_list_tag():
# This is for llvm 3.9
assert c in [cl.name for cl in classes]

assert len(typedefs) == 4 or len(typedefs) == 5
if len(typedefs) == 5:
# This is for llvm 3.9. The class __va_list_tag struct is still
# there but the typedef is gone
Expand All @@ -72,8 +68,6 @@ def test_keep_va_list_tag():
for t in known_typedefs:
assert t in [ty.name for ty in typedefs]

assert tag in [var.decl_string.split("::")[1] for var in variables]

# 4 variables in __va_list_tag, and 4 more in __NSConstantString_tag
# for llvm 3.9
assert len(variables) == 4 or len(variables) == 8
Expand Down Expand Up @@ -106,7 +100,6 @@ def test_remove_va_list_tag():
assert len(classes) == 1

assert tag not in [ty.name for ty in typedefs]
assert len(typedefs) == 3 or len(typedefs) == 4
if len(typedefs) == 4:
# This is for llvm 3.9
for t in known_typedefs_llvm39:
Expand Down