Currently we do not import the implicit CXXRecordDecl of a
ClassTemplateSpecializationDecl. This patch fixes it.
Details
Diff Detail
- Repository
- rC Clang
- Build Status
Buildable 18314 Build 18314: arc lint + arc unit
Event Timeline
lib/AST/ASTImporter.cpp | ||
---|---|---|
1962 | We are changing import if RecordDecl. Is it possible to add a test that doesn't require templates? |
- Add new test case for simple CXXRecordDecl
- Add comment about ClassTemplateSpecializationDecl implicit CXXRecordDecl
lib/AST/ASTImporter.cpp | ||
---|---|---|
1962 | Yes, I've added a new test which exercises only a RecordDecl. |
LGTM with a nit.
lib/AST/ASTImporter.cpp | ||
---|---|---|
1962 | Multiline comments are pretty uncommon in LLVM. Could you please replace it with // before commit? I.e. if (Definition && Definition != D && // // !D->isImplicit()) |
We are changing import if RecordDecl. Is it possible to add a test that doesn't require templates?
I tried and found that the implicit CXXRecordDecl of ClassTemplateSpecializationDecl is its redeclaration. That's not true for normal CXXRecordDecls, as I see, so this deserves a comment.