[libcxx-commits] [PATCH] D124175: [libcxx] Reject month 0 in get_date/__get_month

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 26 08:34:53 PDT 2022


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


================
Comment at: libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp:114
+        // We consume the first two chars checking the month.
+        assert(base(i) == in+2);
+        // tm is not modified.
----------------
DavidSpickett wrote:
> Mordante wrote:
> > This should be guarded with
> > ```
> > #if _LIBCPP_VERSION
> >         assert(base(i) == in+2);
> > #else
> >         assert(base(i) == in+2);
> > #endif
> > ```
> > Our tests should be portable and MSVC STL and GCC use them.
> I'll confirm what MSVC does and add these guards.
I'm assuming no MSVC guards is ok.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124175



More information about the libcxx-commits mailing list