[PATCH] D113393: [c++2b] Implement P0849R8 auto(x)
Zhihao Yuan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 11 16:22:42 PST 2022
lichray marked 2 inline comments as done.
lichray added inline comments.
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2396
+def ext_decltype_auto_expr : ExtWarn<
+ "ISO C++23 DIS does not allow functional-style cast to 'decltype(auto)'">,
+ InGroup<DiagGroup<"decltype-auto-cast">>;
----------------
aaron.ballman wrote:
> Is there a reason this one should be `ExtWarn` instead of `Extension`? (I think we typically only issue this kind of diagnostic when `-pedantic` is specified.)
I took a look at other warnings. It seems that Clang believes that a portable program can contain `Extension`s; if `ExtWarn` is issued, the program is not likely to be portable.
I asked GCC folks yesterday to see if they want to implement this extension, and they are not interested. So I guess `ExtWarn` is suitable for now.
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