Skip to content

Bitfields in class templates cause assertion failures - Regression from 878a24ee244a #44231

@smeenai

Description

@smeenai
Bugzilla Link 44886
Resolution FIXED
Resolved on Feb 13, 2020 00:33
Version 10.0
OS All
Blocks #43900
CC @efriedma-quic,@elizabethandrews,@zmodem,@slacka,@mibintc,@zygoloid,@rnk

Extended Description

$ cat reduced.cpp
template class C {
enum { K = 1 };
int i : K;
unsigned u() { return i; }
};

$ clang -cc1 -fsyntax-only reduced.cpp
clang: /home/smeenai/llvm-project/clang/lib/AST/ExprConstant.cpp:14529: bool clang::Expr::isIntegerConstantExpr(llvm::APSInt &, const clang::ASTContext &, clang::SourceLocation *, bool) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a de
pendent expression."' failed.

I bisected this to 878a24e, so it's a regression from 9 to 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions