alexfh wrote:
> > Thank you for the fix! I'll test this internally and will come back with
> > the results.
>
> I tested this patch internally and haven't found any issues.
Apparently, compiling our code with optimized clang binary was not enough. When
running Clang built with assertions, I found some cases where this commit
causes crashes. I'll prepare a test case, but maybe the assertion failure along
with the crash stack will tell you something already:
```
assertion failed at clang/include/clang/AST/Redeclarable.h:262 in
redecl_iterator
&clang::Redeclarable<clang::TagDecl>::redecl_iterator::operator++() [decl_type
= clang::TagDecl]: 0 && "Passed first decl twice, invalid redecl chain!"
@ 0x556465eaa9a4 __assert_fail
@ 0x556460c73451 clang::ASTDeclMerger::MergeDefinitionData()
@ 0x556460c9014a clang::ASTDeclReader::UpdateDecl()
@ 0x556460c8e753 clang::ASTReader::loadDeclUpdateRecords()
@ 0x556460c22887 clang::ASTReader::finishPendingActions()
@ 0x556460c282e2 clang::ASTReader::FinishedDeserializing()
@ 0x556460c1776e clang::ASTReader::FindExternalVisibleDeclsByName()
@ 0x556461c926b3 clang::DeclContext::lookupImpl()
@ 0x55646127c4d8 clang::Sema::LookupSpecialMember()
@ 0x55646127ceb7 clang::Sema::LookupDefaultConstructor()
@ 0x55646123b95c TryListInitialization()
@ 0x556461239924 clang::InitializationSequence::InitializeFrom()
@ 0x55646104b488 clang::Sema::ConvertParamDefaultArgument()
@ 0x55646104b92b clang::Sema::ActOnParamDefaultArgument()
@ 0x556460b6ad23 clang::Parser::ParseParameterDeclarationClause()
@ 0x556460b67c0d clang::Parser::ParseFunctionDeclarator()
@ 0x556460b65149 clang::Parser::ParseDirectDeclarator()
@ 0x556460b635e9 clang::Parser::ParseDeclaratorInternal()
@ 0x55646211d8af
clang::StackExhaustionHandler::runWithSufficientStackSpace()
@ 0x556460b52217 clang::Parser::ParseDeclGroup()
@ 0x556460ae6890 clang::Parser::ParseDeclOrFunctionDefInternal()
@ 0x556460ae6182 clang::Parser::ParseDeclarationOrFunctionDefinition()
@ 0x556460ae502f clang::Parser::ParseExternalDeclaration()
@ 0x556460b29f67 clang::Parser::ParseInnerNamespace()
@ 0x556460b2960d clang::Parser::ParseNamespace()
@ 0x556460b50fa4 clang::Parser::ParseDeclaration()
@ 0x556460ae4c15 clang::Parser::ParseExternalDeclaration()
@ 0x556460ae3584 clang::Parser::ParseTopLevelDecl()
@ 0x556460ad6d1e clang::ParseAST()
@ 0x5564609e394a clang::FrontendAction::Execute()
@ 0x556460959e7d clang::CompilerInstance::ExecuteAction()
@ 0x55645fc3366e clang::ExecuteCompilerInvocation()
@ 0x55645fc26aaa cc1_main()
```
https://github.com/llvm/llvm-project/pull/170090
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits