[PATCH] D49504: Enable C++2a Chrono Literals

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 05:55:30 PDT 2018


aaron.ballman added inline comments.


================
Comment at: lib/Lex/LiteralSupport.cpp:815
       .Cases("il", "i", "if", true)
+      .Cases("d", "y", LangOpts.CPlusPlus2a)
       .Default(false);
----------------
Is it possible for the library to expose those outside of C++2a mode? We pass `true` for the C++14 cases, so I'm wondering about tying it to C++2a explicitly.


================
Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:1
+// RUN: %clang_cc1 -std=c++2a %s -include %s -verify
+
----------------
Can you drop the svn properties, please?


================
Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:12
+  }
+  using size_t = decltype(sizeof(0));
+  constexpr chrono::day operator"" d(unsigned long long d) noexcept;
----------------
Is this needed?


https://reviews.llvm.org/D49504





More information about the cfe-commits mailing list