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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337454: Enable C++2a Chrono Literals (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined

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

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
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);

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 156252. erichkeane marked 4 inline comments as done. erichkeane added a comment. @aaron.ballman s comments. https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined-literals.cpp Index: lib/Lex/LiteralSupport

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

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:815 .Cases("il", "i", "if", true) + .Cases("d", "y", LangOpts.CPlusPlus2a) .Default(false); aaron.ballman wrote: > Is it possible for the library to expose those outside o

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

2018-07-19 Thread Aaron Ballman via Phabricator via cfe-commits
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 pas

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

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 156143. erichkeane added a comment. @mclow.lists s comments. https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined-literals.cpp Index: lib/Lex/LiteralSupport.cpp ==

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

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D49504#1167045, @mclow.lists wrote: > This looks ok to me - I'm assuming that somewhere there's a test for `int foo > = 0x123d`, so we're sure that didn't get broken. The hex_d SHOULD be testing that, it ensures that the RHS is an integer

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

2018-07-18 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. This looks ok to me - I'm assuming that somewhere there's a test for `int foo = 0x123d`, so we're sure that didn't get broken. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:8 +namespace std { + struct string {}; + namespace chrono { --

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

2018-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rsmith, gribozavr, ddunbar, eli.friedman. Herald added a subscriber: cfe-commits. C++2a via http://wg21.link/p0355 permits the library literals of 'd' and 'y'. This patch enables them in the Lexer so that they can be properly parsed.