summaryrefslogtreecommitdiff
path: root/test/Lexer/hexfloat.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Don't require -re suffix on -verify directives with regexes."Alp Toker2013-12-141-1/+1
| | | | | | | | | | This patch was submitted to the list for review and didn't receive a LGTM. (In fact one explicit objection and one query were raised.) This reverts commit r197295. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197299 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't require -re suffix on -verify directives with regexes.Hans Wennborg2013-12-141-1/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D2392 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197295 91177308-0d34-0410-b5e6-96231b3b80d8
* Change semantics of regex expectations in the diagnostic verifierHans Wennborg2013-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously, a line like // expected-error-re {{foo}} treats the entirety of foo as a regex. This is inconvenient when matching type names containing regex characters. For example, to match "void *(class test8::A::*)(void)" inside such a regex, one would have to type "void \*\(class test8::A::\*\)\(void\)". This patch changes the semantics of expected-error-re to only treat the parts of the directive wrapped in double curly braces as regexes. This avoids the escaping problem and leads to nicer patterns for those cases; see e.g. the change to test/Sema/format-strings-scanf.c. (The balanced search for closing }} of a directive also makes us handle the full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.) Differential Revision: http://llvm-reviews.chandlerc.com/D2388 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197092 91177308-0d34-0410-b5e6-96231b3b80d8
* PR12717: Clang supports hexadecimal floating-point literals in all languageRichard Smith2012-06-151-0/+8
| | | | | | | | | | | | | | modes. For languages other than C99/C11, this isn't quite a conforming extension, and for C++11, it breaks some reasonable code containing user-defined literals. In languages which don't officially have hexfloats, pare back this extension to only apply in cases where the token starts 0x and does not contain an underscore. The extension is still not quite conforming, but it's a lot closer now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158487 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing hex floating literal support so that it handles 0x.2p2 properly.Aaron Ballman2012-02-081-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150072 91177308-0d34-0410-b5e6-96231b3b80d8
* Hex literals without a significand no longer crash the lexer. Fixes bug 7910Aaron Ballman2012-02-071-0/+1
| | | | | | Patch by Eitan Adler git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149984 91177308-0d34-0410-b5e6-96231b3b80d8
* We do parse hexfloats in C++11; make it actually work.Douglas Gregor2011-10-121-7/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141798 91177308-0d34-0410-b5e6-96231b3b80d8
* A bug I've introduced in STDIN handling surfaced a few broken tests, fix them.Benjamin Kramer2010-06-251-2/+3
| | | | | | | Lexer/hexfloat.cpp is now XFAIL'd, I'd appreciate if someone could look into it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106840 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't warn about use of hex floats in c++ mode by default,Chris Lattner2010-05-201-2/+2
| | | | | | | | | | matching G++'s behavior. Warn when -pedantic or -Wc++-hex-floats is passed, and don't warn if -pedantic -Wno-c++-hex-floats are both passed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104295 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not parse hexadecimal floating point literals in C++0x mode because they areSean Hunt2010-01-101-0/+8
incompatible with user-defined literals, specifically with the following form: 0x1p+1 The preprocessing-number token extends only as far as the 'p'; the '+' is not included. Previously we could get away with this extension as p was an invalid suffix, but now with user-defined literals, 'p' might well be a valid suffix and we are forced to consider it as such. This patch also adds a warning in non-0x C++ modes telling the user that this extension is incompatible with C++0x that is enabled by default (previously and with other languages, we warn only with a compliance option such as -pedantic). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93135 91177308-0d34-0410-b5e6-96231b3b80d8