From faada3e569766163c854a4d95ca8630199ddac60 Mon Sep 17 00:00:00 2001 From: Rachida Kebichi Date: Tue, 4 May 2021 11:30:43 -0400 Subject: [PATCH] SWDEV-283958 Workaround for unnamed structs CppHeaderParser has limited support for unnamed structs. It leaves the name empty so this results in classes (a.k.a structs) having trailing '::' characters, also giving no way to distingush two unnamed structs at the same level of nesting. An example are the inner structs of hipExternalSemaphoreSignalParams. The workaround consists in skipping over these, so they are not generated in the output header file which lists all ostream ops<<. Only the inner unnamed structs are skipped, the rest is processed as it should. Change-Id: I17439c46095469b7adb7aee0b0f0b3d234aabc11 --- script/gen_ostream_ops.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/gen_ostream_ops.py b/script/gen_ostream_ops.py index 180103a54e..0ffb43ef07 100755 --- a/script/gen_ostream_ops.py +++ b/script/gen_ostream_ops.py @@ -147,6 +147,7 @@ def gen_cppheader(infilepath, outfilepath, rank): output_filename_h.write("// End of basic ostream ops\n\n") for c in cppHeader.classes: + if c[-2] == ':' and c[-1] == ':': continue #ostream operator cannot be overloaded for anonymous struct therefore it is skipped if "union" in c: continue if c in structs_analyzed: