[PATCH] D113393: [c++2b] Implement P0849R8 auto(x)

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 30 14:54:14 PST 2021


rsmith added a comment.

Generally this looks good. In addition to the `ExtWarn` for the `decltype(auto)` case, I think we're also missing a `-Wc++20-compat` warning for the feature as a whole.



================
Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.auto.deduct/p2.cpp:4
+// p2.3 allows only T = auto in T(x).
+// As a Clang extension, we also allow T = decltype(auto) to match p2.2 (new T(x)).
+
----------------
We should produce an `ExtWarn` for this case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113393



More information about the cfe-commits mailing list