Closed balazske closed 5 years ago
It is not possible to fully achieve this task (without too big changes):
ASTImporter
has the knowledge about what is checked (on top level) and for what purpose (and the generated message may depend on this) but IsStructurallyEquivalent
has the knowledge about what difference was exactly detected.ASTStructuralEquivalence.cpp
are poorly designed, some things are checked at multiple places. Some refactoring may be needed here to have the correct (and one) place where a message for a specific found difference is generated.
Currently at ODR failure some of the diagnostic messages are put from
ASTImporter
, some of them from theIsStructurallyEquivalent
functions. All of these warnings should be moved into the structurally equivalence checks. There is more information about the exact type of the problem and the problem is there detected first (if a variable is not equivalent with another it may be because its type is not detected as equivalent but the warning is still put out for the variable). There are many places where no warning is produced at all, these should be corrected (get warnings for all cases whenIsStructurallyEquivalent
returns false not after calling anotherIsStructuralyEquivalent
).