[PATCH] D71576: [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 16 18:36:06 PST 2019


rsmith marked 3 inline comments as done.
rsmith added inline comments.


================
Comment at: clang/lib/AST/Type.cpp:1865-1866
   // enumeration type in the sense required here.
   // C++0x: However, if the underlying type of the enum is fixed, it is
   // considered complete.
   if (const auto *ET = dyn_cast<EnumType>(CanonicalType))
----------------
rsmith wrote:
> rnk wrote:
> > Is this C++11 comment still relevant? I assume that `isComplete` handles this case by returning true, and a forward decl can tell us if the enum is scoped.
> I don't think this is useful -- and probably nor is the `isComplete` check. I'll look into this in a follow-up commit.
Fixed in rGeea8ba097c4a86632b88291bea51eb710f8ae4fb. Turns out this was hiding a bug in how we checked `static_cast<Enum>(...)` for incomplete enum types.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71576





More information about the cfe-commits mailing list