[PATCH] D105127: Implement P1401R5

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 30 14:41:41 PDT 2021


mizvekov added a comment.

LGTM!

Since you submitted this quite recently, I would wait some more time before landing, for any other people who might want to review this.
Maybe wait for it to be a week old, ping anyone else you might want to get a review from, and wait a couple of days for them to respond.



================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:3930
+  ExprResult E = PerformContextuallyConvertToBool(CondExpr);
+  if (!IsConstexpr || CondExpr->isValueDependent())
+    return E;
----------------
mizvekov wrote:
> Minor nit: I think it would be a tiny bit clearer if you factored out this condition, since you repeat it:
> ```
> bool IsConstexprNonValueDependent = IsConstexpr  && !CondExpr->isValueDependent();
> if (!LangOpts.CPlusPlus2b && IsConstexprNonValueDependent) {
> ....
> if (!IsConstexprNonValueDependent)
> ```
By the way you fixed this by reverting back to the original form pre-refactoring, so my tip above applies again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105127/new/

https://reviews.llvm.org/D105127



More information about the cfe-commits mailing list