summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/lex/lex.literal
Commit message (Collapse)AuthorAgeFilesLines
* Convert test/CXX/lex/lex.literal/lex.string/p4.cpp back to DOS lineDimitry Andric2016-01-041-17/+17
| | | | | | | endings, since the file is supposed to have them, according to its comments. Also set its svn:eol-style property. Noticed by Nico Weber. llvm-svn: 256742
* Fix several accidental DOS line endings in source filesDimitry Andric2016-01-031-17/+17
| | | | | | | | | | | | | | | Summary: There are a number of files in the tree which have been accidentally checked in with DOS line endings. Convert these to native line endings. There are also a few files which have DOS line endings on purpose, and I have set the svn:eol-style property to 'CRLF' on those. Reviewers: joerg, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D15849 llvm-svn: 256704
* When pretty-printing a C++11 literal operator, don't insert whitespace betweenRichard Smith2015-10-084-18/+18
| | | | | | | the "" and the suffix; that breaks names such as 'operator""if'. For symmetry, also remove the space between the 'operator' and the '""'. llvm-svn: 249641
* [Lex] A source-file new-line in a raw string literal results in a new-lineDavid Majnemer2015-09-231-0/+17
| | | | | | | | | Our string literal parser copied any source-file new-line characters into the execution string-literal. This is incorrect if the source-file new-line character was a \r\n sequence because new-line characters are merely \n. llvm-svn: 248392
* Improving the "integer constant too large" diagnostics based on post-commit ↵Aaron Ballman2014-07-241-1/+1
| | | | | | feedback from Richard Smith. Amends r213657. llvm-svn: 213865
* Provide extra information in the "integer constant is too large" diagnostic. ↵Aaron Ballman2014-07-221-1/+1
| | | | | | This will be used to improve other diagnostics. llvm-svn: 213657
* Add a triple to unbreak buildbots where size_t is not 'unsigned long'.Richard Smith2013-10-072-2/+2
| | | | llvm-svn: 192140
* Add support for WG21 N3599 (literal operator template for strings) as a GNURichard Smith2013-10-074-2/+45
| | | | | | | | | extension. The GCC folks have decided to support this even though the standard committee have not yet approved this feature. Patch by Hristo Venev! llvm-svn: 192128
* Integers which are too large should be an error.Eli Friedman2013-07-231-1/+1
| | | | | | | | Switch some warnings over to errors which should never have been warnings in the first place. (Also, a minor fix to the preprocessor rules for integer literals while I'm here.) llvm-svn: 186903
* Teach Lexer::getSpelling about raw string literals. Specifically, if a rawRichard Smith2012-11-281-0/+7
| | | | | | | | string literal needs cleaning (because it contains line-splicing in the encoding prefix or in the ud-suffix), do not clean the section between the double-quotes -- that's the "raw" bit! llvm-svn: 168776
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Harden test for 32 bit platforms, where size_t is unsigned int (not unsigned ↵Benjamin Kramer2012-03-091-5/+5
| | | | | | long). llvm-svn: 152404
* Support for raw and template forms of numeric user-defined literals,Richard Smith2012-03-096-0/+106
| | | | | | and lots of tidying up. llvm-svn: 152392
* Remove a test FIXME for a case which is already fixed.Richard Smith2012-03-081-3/+2
| | | | llvm-svn: 152349
* Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix notRichard Smith2012-03-082-6/+6
| | | | | | | | | | | | | | | | | | starting with an underscore is ill-formed. Since this rule rejects programs that were using <inttypes.h>'s macros, recover from this error by treating the ud-suffix as a separate preprocessing-token, with a DefaultError ExtWarn. The approach of treating such cases as two tokens is under discussion for standardization, but is in any case a conforming extension and allows existing codebases to keep building while the committee makes up its mind. Reword the warning on the definition of literal operators not starting with underscores (which are, strangely, legal) to more explicitly state that such operators can't be called by literals. Remove the special-case diagnostic for hexfloats, since it was both triggering in the wrong cases and incorrect. llvm-svn: 152287
* AST representation for user-defined literals, plus just enough of semanticRichard Smith2012-03-073-11/+8
| | | | | | | | | | | | | | | | | | | | | analysis to make the AST representation testable. They are represented by a new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic properties, including full CodeGen support, are achieved for free by this representation. UserDefinedLiterals can never be dependent, so no custom instantiation behavior is required. They are mangled as if they were direct calls to the underlying literal operator. This matches g++'s apparent behavior (but not its actual mangling, which is broken for literal-operator-ids). User-defined *string* literals are now fully-operational, but the semantic analysis is quite hacky and needs more work. No other forms of user-defined literal are created yet, but the AST support for them is present. This patch committed after midnight because we had already hit the quota for new kinds of literal yesterday. llvm-svn: 152211
* More tests for r152012.Richard Smith2012-03-053-0/+49
| | | | llvm-svn: 152013
* Lexing support for user-defined literals. Currently these lex as the same tokenRichard Smith2012-03-051-2/+2
| | | | | | | kinds as the underlying string literals, and we silently drop the ud-suffix; those issues will be fixed by subsequent patches. llvm-svn: 152012
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-132-2/+2
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Allow C99 hexfloats in C++0x mode. This change resolves the standardsDouglas Gregor2011-08-301-0/+7
| | | | | | | | | collision between C99 hexfloats and C++0x user-defined literals by giving C99 hexfloats precedence. Also, warning about user-defined literals that conflict with hexfloats and those that have names that are reserved by the implementation. Fixes <rdar://problem/9940194>. llvm-svn: 138839
* This patch makes the string/character literal tests run in C,Douglas Gregor2011-07-291-1/+3
| | | | | | C++98/03, and C++0x mode, from Craig Topper! llvm-svn: 136443
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-271-1/+6
| | | | llvm-svn: 136210
* Fix for PR6220: compute the correct type for multicharacter literals.Eli Friedman2010-02-031-0/+9
llvm-svn: 95228
OpenPOWER on IntegriCloud