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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to