r303317 - The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop.
Nick Lewycky via cfe-commits
cfe-commits at lists.llvm.org
Tue May 30 19:01:22 PDT 2017
Joerg Sonnenberger wrote:
> On Wed, May 17, 2017 at 11:56:55PM -0000, Nick Lewycky via cfe-commits wrote:
>> Author: nicholas
>> Date: Wed May 17 18:56:54 2017
>> New Revision: 303317
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=303317&view=rev
>> Log:
>> The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop.
>
> Crashes with -std=c++11 on:
>
> enum SizeHint { MinimumSize, MaximumSize };
> class QSizeF {
> public:
> constexpr QSizeF();
> QSizeF m_fn1(QSizeF);
> double wd;
> double ht;
> };
> constexpr QSizeF::QSizeF() : wd(), ht() {}
> class A {
> void m_fn2();
> QSizeF m_fn3(SizeHint, const QSizeF& = QSizeF());
> };
> void A::m_fn2() { m_fn3(MinimumSize).m_fn1(m_fn3(MaximumSize)); }
Did you run this with assertions disabled? This looks like another
testcase for PR33140, but it should hit an assertion first.
Nick
More information about the cfe-commits
mailing list