summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer/cxx1y_digit_separators.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Lex] Fix handling numerical literals ending with ' and signed exponent.Volodymyr Sapsai2018-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | For input `0'e+1` lexer tokenized as numeric constant only `0'e`. Later NumericLiteralParser skipped 0 and ' as digits and parsed `e+1` as valid exponent going past the end of the token. Because it didn't mark numeric literal as having an error, it continued parsing and tried to expandUCNs with StringRef of length -2. The fix is not to parse exponent when we reached the end of token. Discovered by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4588 rdar://problem/36076719 Reviewers: rsmith, t.p.northover Reviewed By: rsmith Subscribers: cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D41834 llvm-svn: 324419
* Update diagnostics now that hexadecimal literals look likely to be part of ↵Richard Smith2016-03-041-1/+1
| | | | | | C++17. llvm-svn: 262753
* PR26349: correctly check whether a digit sequence is empty in the presence ↵Richard Smith2016-02-091-0/+3
| | | | | | of digit separators. llvm-svn: 260307
* Add some missing checks for C++1y digit separators that don't in fact separateRichard Smith2014-04-221-0/+14
| | | | | | | | digits. Turns out we have completely separate lexing codepaths for floating point numbers depending on whether or not they start with a zero. Who knew... =) llvm-svn: 206932
* Tests for lexing of digit separators versus UCNs.Richard Smith2014-02-281-0/+20
| | | | llvm-svn: 202534
* Fix a minor bug in lexing pp-numbers with digit separators: if a pp-number ↵Richard Smith2014-02-281-0/+2
| | | | | | contains "'e+", the pp-number ends between the 'e' and the '+'. llvm-svn: 202533
* Add macro test from N3781.Richard Smith2013-09-261-0/+5
| | | | llvm-svn: 191444
* Per updates to D3781, allow underscore under ' in a pp-number, and allow ' ↵Richard Smith2013-09-261-2/+6
| | | | | | in a #line directive. llvm-svn: 191443
* Implement C++1y digit separator proposal (' as a digit separator). This is notRichard Smith2013-09-261-0/+34
yet approved by full committee, but was unanimously supported by EWG. llvm-svn: 191417
OpenPOWER on IntegriCloud