[PATCH] D119375: [Clang][Sema] Do not evaluate value-dependent immediate invocations
Corentin Jabot via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 10 02:29:27 PST 2022
cor3ntin added a subscriber: erichkeane.
cor3ntin added a comment.
This looks like the right fix to me but I would prefer @aaron.ballman or @erichkeane to have the final say.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:16731
/*IsImmediateInvocation*/ true);
- ExprEvalContexts.back().ImmediateInvocationCandidates.emplace_back(Res, 0);
+ /// Value-dependent constant expression are not meant to be calculated.
+ /// Each template instantiation will calculate its own value later.
----------------
I'd say something like
/// Value-dependent constant expressionS should not be immediately
// evaluated until they are instantiated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119375/new/
https://reviews.llvm.org/D119375
More information about the cfe-commits
mailing list