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
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 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
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
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
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
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
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
==
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
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 {
--
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.
11 matches
Mail list logo