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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 19 06:40:41 PDT 2018


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: lib/Lex/LiteralSupport.cpp:815
       .Cases("il", "i", "if", true)
+      .Cases("d", "y", LangOpts.CPlusPlus2a)
       .Default(false);
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > 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.
> In the C++14 cases, we return true because we've checked C++14 mode on line 805.  I was hoping to do that for consistencies sake. Depending on your opinion, bringing 805 down to 812/813/814 (checking inline) might be a good idea.
> 
> According to the tests, 'sv' (string view) was the only one for C++17, but it wasn't really necessary to check here since it is only allowed on strings and not on integer literals.
Ahh, I see what's going on now. Thank you, this looks fine to me.


https://reviews.llvm.org/D49504





More information about the cfe-commits mailing list