Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Emit ODR related diagnostic only from ASTStructuralEquivalence check #536

Closed balazske closed 5 years ago

balazske commented 5 years ago

Currently at ODR failure some of the diagnostic messages are put from ASTImporter, some of them from the IsStructurallyEquivalent 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 when IsStructurallyEquivalent returns false not after calling another IsStructuralyEquivalent).

balazske commented 5 years ago

It is not possible to fully achieve this task (without too big changes):