Skip to content

Assertion `MaybeODRUseExprs.empty() && "Leftover expressions for odr-use checking"' failed (recent regression) #42174

@miyuki

Description

@miyuki
Bugzilla Link 42829
Resolution DUPLICATE
Resolved on Aug 28, 2019 13:34
Version trunk
OS Linux
Blocks #41819
CC @davidbolvansky,@DougGregor,@zmodem,@zygoloid

Extended Description

Starting with:

commit 715f7a1
Author: Richard Smith richard-llvm@metafoo.co.uk
Date: Tue Jun 11 17:50:32 2019 +0000

For DR712: store on a DeclRefExpr whether it constitutes an odr-use. Begin restructuring to support the forms of non-odr-use reference permitted by DR712. llvm-svn: 363086 

The following code causes an assertion failure:

$ cat test.cc
const unsigned long s = alignof(int);
void foo() { alignas(s) int j; }

$ clang -fsyntax-only test.cc
... clang/lib/Sema/SemaDecl.cpp:13525: clang::Decl* clang::Sema::ActOnFinishFunctionBody(clang::Decl*, clang::Stmt*, bool): Assertion `MaybeODRUseExprs.empty() && "Leftover expressions for odr-use checking"' failed.
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++duplicateResolved as duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions