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
이 커밋은 다음에 포함됨:
Rachida Kebichi
2021-05-04 11:30:43 -04:00
부모 7bcac00f35
커밋 faada3e569
+1
파일 보기
@@ -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: