diff options
author | Balázs Kéri <1.int32@gmail.com> | 2021-01-07 08:41:08 +0100 |
---|---|---|
committer | Balázs Kéri <1.int32@gmail.com> | 2021-01-07 11:28:11 +0100 |
commit | 0877b963ef2d3c384b47f7a6161c9d9ab106a7f2 (patch) | |
tree | e42ac9b8f72f88aadf44c8215642c449558b6f40 /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 67a4c672b02359fa6f723249f633ffc76aff2174 (diff) | |
download | llvm-0877b963ef2d3c384b47f7a6161c9d9ab106a7f2.zip llvm-0877b963ef2d3c384b47f7a6161c9d9ab106a7f2.tar.gz llvm-0877b963ef2d3c384b47f7a6161c9d9ab106a7f2.tar.bz2 |
[clang][ASTImporter] Fix a possible assertion failure `NeedsInjectedClassNameType(Decl)'.
The assertion can happen if ASTImporter imports a CXXRecordDecl in a template
and then imports another redeclaration of this declaration, while the first import is in progress.
The process of first import did not set the "described template" yet
and the second import finds the first declaration at setting the injected types.
Setting the injected type requires in the assertion that the described template is set.
The exact assertion was:
clang/lib/AST/ASTContext.cpp:4411:
clang::QualType clang::ASTContext::getInjectedClassNameType(clang::CXXRecordDecl*, clang::QualType) const:
Assertion `NeedsInjectedClassNameType(Decl)' failed.
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D94067
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions