This revision was automatically updated to reflect the committed changes.
Closed by commit rL333269: [ASTImporter] Fix ClassTemplateSpecialization in
wrong DC (authored by martong, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D47058
Fil
a.sidorin accepted this revision.
a.sidorin added a comment.
This revision is now accepted and ready to land.
Ok, I got it, thank you!
Repository:
rC Clang
https://reviews.llvm.org/D47058
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
martong added a comment.
> Could you add a test for TSK_Undeclared as well?
TLDR: No, I cannot.
`TSK_Undeclared` is used to indicate that a template specialization was formed
from a template-id but has not yet been declared, defined, or instantiated.
Consequently,
`ClassTemplateSpecializationDe
a.sidorin added a comment.
Hi Gabor,
Could you add a test for TSK_Undeclared as well?
Repository:
rC Clang
https://reviews.llvm.org/D47058
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
martong added inline comments.
Comment at: lib/AST/ASTImporter.cpp:4305
+// Add to the DC only if it was an explicit specialization/instantiation.
+if (D2->getTemplateSpecializationKind() != TSK_ImplicitInstantiation) {
+ LexicalDC->addDeclInternal(D2);
-
martong updated this revision to Diff 147966.
martong marked an inline comment as done.
martong added a comment.
Use isExplicitInstantiationOrSpecialization
Repository:
rC Clang
https://reviews.llvm.org/D47058
Files:
lib/AST/ASTImporter.cpp
unittests/AST/ASTImporterTest.cpp
Index: unit
a.sidorin requested changes to this revision.
a.sidorin added a comment.
This revision now requires changes to proceed.
(Sorry, accepted accidentially).
Repository:
rC Clang
https://reviews.llvm.org/D47058
___
cfe-commits mailing list
cfe-commits
a.sidorin accepted this revision.
a.sidorin added a comment.
This revision is now accepted and ready to land.
Hi Gabor! I have a question.
Comment at: lib/AST/ASTImporter.cpp:4305
+// Add to the DC only if it was an explicit specialization/instantiation.
+if (D2->getTem
martong created this revision.
martong added reviewers: a.sidorin, r.stahl, xazax.hun.
Herald added subscribers: cfe-commits, dkrupp, rnkovacs.
ClassTemplateSpecialization is put in the wrong DeclContex if implicitly
instantiated. This patch fixes it.
Repository:
rC Clang
https://reviews.llvm