[PATCH] D99459: [OpenMP] Implement '#pragma omp unroll'.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 08:36:36 PDT 2021
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:12821
+/// Determine whether an expression is constant without emitting diagnostic.
+static bool isConstantExpression(Sema &SemaRef, Expr *E) {
+ struct ConstTripcountDiagnoser : public Sema::VerifyICEDiagnoser {
----------------
Meinersbur wrote:
> ABataev wrote:
> > Can you use `VerifyPositiveIntegerConstantInClause` function instead?
> The reason for this new function is that `VerifyPositiveIntegerConstantInClause` also emits a note on why it is not a constant expression:
> ```
> note: read of non-const variable '.capture_expr.' is not allowed in a constant expression
> ```
> Printing internal variable names is more confusing than helpful to the user.
Maybe expand `VerifyPositiveIntegerConstantInClause` to exclude this rather than add a new function?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99459/new/
https://reviews.llvm.org/D99459
More information about the llvm-commits
mailing list