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

[ASTImporter] Import friend class templates better. #407

Closed balazske closed 6 years ago

balazske commented 6 years ago

Somewhat experimental change, but import of friend class templates should be improved.

403 is solved by this change.

balazske commented 6 years ago

A new commit was added with another way of setting the PrevDecl. Lookup of template definition is restored to before use of IsStructurallyEquivalent. (There may be still problems with decl chains of templates and corresponding templated records but this was the case before the fix too.) (The new commit is added only to see the changes related to the old one.)

balazske commented 6 years ago

Replaced commits into 1 commit. The suggested assertion is now inserted. If it appears the solution can be to find the most recent previous declaration with described class template.

balazske commented 6 years ago

Upstream review: https://reviews.llvm.org/D50516