[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 13:37:28 PDT 2019
tra added a comment.
Perhaps we should allow this in all unevaluated contexts?
I.e. `int s = sizeof(foo(x));` should also work.
================
Comment at: clang/include/clang/Sema/Sema.h:10411
+ auto I =
+ std::find_if(ExprEvalContexts.rbegin(), ExprEvalContexts.rend(),
+ [](const ExpressionEvaluationContextRecord &C) {
----------------
I think you want `return llvm::any_of(ExprEvalContexts, ...)` here and you can fold it directly into `if()` below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61458/new/
https://reviews.llvm.org/D61458
More information about the cfe-commits
mailing list