This fixes an issue where immediate invocations were queued inside of decltype, resulting in decltype's operand being evaluated.
Diff Detail
Diff Detail
Event Timeline
clang/lib/Sema/SemaExpr.cpp | ||
---|---|---|
15389 | the issue is seems more general than delctype. it applies to all unvealuated context (sizeof, alignof ...) i think we should use Sema::isUnevaluatedContext() here. |
Comment Actions
Thanks Tyker, you're right, there is a general problem that needs handled, if this is to be handled; I had a bit of tunnel vision here. However, I'm retracting/abandoning this patch entirely as upon further review, it's not standard compliant. The current situation, is actually the correct one (for now?).
From [7.7.13] of the working draft:
Note: A manifestly constant-evaluated expression is evaluated even in an unevaluated operand.
the issue is seems more general than delctype. it applies to all unvealuated context (sizeof, alignof ...)
i think we should use Sema::isUnevaluatedContext() here.