Page MenuHomePhabricator

Fix crash in Sema when wrongly assuming VarDecl init is not value dependent.
Needs ReviewPublic

Authored by teemperor on Sep 13 2017, 3:03 AM.

Details

Reviewers
v.g.vassilev
Summary

The attached test case crashes Sema as we call IsVariableAConstantExpression which has as a precondition
that we don't call it on a VarDecl with a value dependent init expression.

Diff Detail

Event Timeline

teemperor created this revision.Sep 13 2017, 3:03 AM
teemperor added a subscriber: cfe-commits.

Could you double-check if we can add this to an existing test? Would test/SemaCXX/pr25181-crash-on-invalid.cpp fit and potentially rename it.

test/SemaCXX/cxx11-odr-use-crash-on-invalid.cpp
8

Looks like this line has spacing problems.