This patch add new tests for structural equivalence. For that a new common header is created which holds the test related language specific types and functions.
Thank you for this patch! Do you plan to enable this functionality for AST import checking?
Some comments are inline.
Header line is too short.
Could you please add a brief file description?
System includes should follow LLVM includes.
I think this function is too big for a header. Same below. Could you create a source file?
Do we need ASTImporter.h?
Nit: comments should end with dot. Could you please check?
Can we assert(FoundDecls.size() == 1)?
D0, D1 (capital). Same below.
Could we just overload testStructuralMatch to accept tuple or pair?
Should we assert for spec_begin() != spec_end() instead or within these assertions?
There is no Code1, so I think we can call it just "Code". Same below.
Redundant space. Could you clang-format?
These assertions are always true because there is a strong C assertion in the callee.
Do you plan to enable this functionality for AST import checking?
Yes. We'd like to test the structural equivalency independently from ASTImporter, because in certain cases it may have faulty behavior. This can be very handy also when we further extend structural equivalency.
I think that is not needed, because the previous cast in line 116 and 118 would assert if spec_begin() == spec_end() was true.
Renamed t to Decls.