https://bugs.llvm.org/show_bug.cgi?id=42829

            Bug ID: 42829
           Summary: Assertion `MaybeODRUseExprs.empty() && "Leftover
                    expressions for odr-use checking"' failed (recent
                    regression)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Starting with:

commit 715f7a1bd058c64a39cc4773114dfb46ae8cc8a3
Author: Richard Smith <[email protected]>
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.
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to