[PATCH] D76724: Prevent immediate evaluations inside of decltype
Tyker via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 25 11:53:47 PDT 2020
Tyker added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:15389
if (!E.isUsable() || !Decl || !Decl->isConsteval() || isConstantEvaluated() ||
- RebuildingImmediateInvocation)
+ isInDeclType(*this) || RebuildingImmediateInvocation)
return E;
----------------
the issue is seems more general than delctype. it applies to all unvealuated context (sizeof, alignof ...)
i think we should use Sema::isUnevaluatedContext() here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76724/new/
https://reviews.llvm.org/D76724
More information about the cfe-commits
mailing list