This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Fix inequivalence of ClassTemplateInstantiations
ClosedPublic

Authored by martong on Jul 5 2019, 4:10 AM.

Details

Summary

We falsely state inequivalence if the template parameter is a
qualified/nonquialified template in the first/second instantiation.
Also, different kinds of TemplateName should be equal if the template
decl (if available) is equal (even if the name kind is different).

Diff Detail

Repository
rL LLVM

Event Timeline

martong created this revision.Jul 5 2019, 4:10 AM

Hi Gabor,
This looks fine, but could you please add a test showing how decl shadowing is handled? I.e. if we have Arg in one TU and both Arg and N::Arg in another TU.

martong updated this revision to Diff 210581.Jul 18 2019, 8:25 AM
  • Add test case ClassTemplSpecWithInequivalentShadowedTemplArg

Hi Gabor,
This looks fine, but could you please add a test showing how decl shadowing is handled? I.e. if we have Arg in one TU and both Arg and N::Arg in another TU.

Alexei,

Thanks for the review! I've added a new test case for that.

@a_sidorin This is a polite Ping.

a_sidorin accepted this revision.Jul 22 2019, 2:40 PM

Looks good! Sorry for the delay :(

This revision is now accepted and ready to land.Jul 22 2019, 2:40 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2019, 8:48 AM