[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 5 19:38:14 PST 2024


alexfh wrote:

Heads up: we're seeing clang crashes after this revision. Assertions-enabled clang fails this assertion (probably related?):
```
assert.h assertion failed at clang/lib/Sema/SemaLookup.cpp:2408 in bool clang::Sema::LookupQualifiedName(LookupResult &, DeclContext *, bool): (!isa<TagDecl>(LookupCtx) || LookupCtx->isDependentContext() || cast<TagDecl>(LookupCtx)->isCompleteDefinition() || cast<TagDecl>(LookupCtx)->isBeingDefined()) && "Declaration context must already be complete!"
    @     0x564ff412fec4  __assert_fail
    @     0x564fefcf58aa  clang::Sema::LookupQualifiedName()
    @     0x564fefbf848c  clang::Sema::FindDeallocationFunction()
    @     0x564fefbf9a28  clang::Sema::ActOnCXXDelete()
    @     0x564feffded5a  clang::TreeTransform<>::TransformStmt()
    @     0x564ff00299f4  clang::TreeTransform<>::TransformCompoundStmt()
    @     0x564ff0044578  clang::TreeTransform<>::TransformIfStmt()
    @     0x564ff00299f4  clang::TreeTransform<>::TransformCompoundStmt()
    @     0x564feffdece8  clang::Sema::SubstStmt()
    @     0x564ff006bef1  clang::Sema::InstantiateFunctionDefinition()
    @     0x564ff006ef7f  clang::Sema::PerformPendingInstantiations()
    @     0x564ff006bfdc  clang::Sema::InstantiateFunctionDefinition()
    @     0x564ff006ef7f  clang::Sema::PerformPendingInstantiations()
    @     0x564ff006bfdc  clang::Sema::InstantiateFunctionDefinition()
    @     0x564ff006ef7f  clang::Sema::PerformPendingInstantiations()
    @     0x564fef86faa7  clang::Sema::ActOnEndOfTranslationUnitFragment()
    @     0x564fef8701e9  clang::Sema::ActOnEndOfTranslationUnit()
    @     0x564fef5a619a  clang::Parser::ParseTopLevelDecl()
    @     0x564fef5a25ee  clang::ParseAST()
    @     0x564fef316d43  clang::FrontendAction::Execute()
    @     0x564fef29b50d  clang::CompilerInstance::ExecuteAction()                                                                                                                                                                                       
    @     0x564fee4490a8  clang::ExecuteCompilerInvocation()
    @     0x564fee43dbbf  cc1_main()
    @     0x564fee43b1d3  ExecuteCC1Tool()
    @     0x564fef42913e  llvm::function_ref<>::callback_fn<>()
    @     0x564ff3db145c  llvm::CrashRecoveryContext::RunSafely()
    @     0x564fef4287a4  clang::driver::CC1Command::Execute()
    @     0x564fef3eee26  clang::driver::Compilation::ExecuteCommand()
    @     0x564fef3ef08f  clang::driver::Compilation::ExecuteJobs()
    @     0x564fef407e00  clang::driver::Driver::ExecuteCompilation()
    @     0x564fee43a89e  clang_main()
    @     0x564fee439074  main
    @     0x7fc63a9bc3d4  __libc_start_main
    @     0x564fee438faa  _start
```

https://github.com/llvm/llvm-project/pull/118455


More information about the cfe-commits mailing list