[PATCH] D39451: P0620 follow-up: deducing `auto` from braced-init-list in new expr
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 11 03:26:45 PST 2017
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1992
+def ext_auto_new_list_init : Extension<
+ "ISO C++ standards before C++17 does not allow new expression for "
+ "type %0 using list-initialization">, InGroup<CXX17>;
----------------
does not -> do not, using -> to use
================
Comment at: lib/Sema/SemaExprCXX.cpp:1763-1765
+ if (Braced && !getLangOpts().CPlusPlus17)
+ Diag(Initializer->getLocStart(), diag::ext_auto_new_list_init)
+ << AllocType << TypeRange;
----------------
Move this after the "ctor_multiple_expressions" diagnostic below.
Repository:
rC Clang
https://reviews.llvm.org/D39451
More information about the cfe-commits
mailing list