[PATCH] D134311: [clang] handle extended integer constant expressions in _Static_assert (PR #57687)

Martin Sebor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 10:26:22 PDT 2022


msebor added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16733
+      while (auto *BaseCast = dyn_cast<ImplicitCastExpr>(BaseExpr))
+        BaseExpr = BaseCast->getSubExpr();
+    }
----------------
aaron.ballman wrote:
> tbaeder wrote:
> > There is `Expr::ignoreParenImpCasts()` or `Expr::ImpCasts()` that should do this loop for you.
> +1, I would use `Expr::IgnoreImpCasts()` instead of this manual loop.
Sure.  Thank you both for the suggestion!


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

https://reviews.llvm.org/D134311



More information about the cfe-commits mailing list