summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx11-user-defined-literals.cpp
Commit message (Collapse)AuthorAgeFilesLines
* When pretty-printing a C++11 literal operator, don't insert whitespace betweenRichard Smith2015-10-081-7/+7
| | | | | | | 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
* Preprocessor: support defined() with operator names for MS compatibilityAlp Toker2014-05-211-1/+1
| | | | | | | | | Also flesh out missing tests, improve diagnostic QOI and fix a couple of corner cases found in the process. Fixes PR10606. llvm-svn: 209276
* PR18870: Parse language linkage specifiers properly if the string-literal isRichard Smith2014-02-171-1/+1
| | | | | | spelled in an interesting way. llvm-svn: 201536
* PR18855: Add support for UCNs and UTF-8 encoding within ud-suffixes.Richard Smith2014-02-171-0/+32
| | | | llvm-svn: 201532
* DR1473: Do not require a space between operator"" and the ud-suffix in aRichard Smith2012-10-201-1/+2
| | | | | | literal-operator-id. llvm-svn: 166373
* Support for raw and template forms of numeric user-defined literals,Richard Smith2012-03-091-4/+4
| | | | | | and lots of tidying up. llvm-svn: 152392
* Fix a couple of issues with literal-operator-id parsing, and provide recoveryRichard Smith2012-03-081-0/+18
| | | | | | | | | | | | for a few kinds of error. Specifically: Since we're after translation phase 6, the "" token might be formed by multiple source-level string literals. Checking the token width is not a correct way of detecting empty string literals, due to escaped newlines. Diagnose and recover from a missing space between "" and suffix, and from string literals other than "", which are followed by a suffix. llvm-svn: 152348
* Add support for cooked forms of user-defined-integer-literal andRichard Smith2012-03-081-21/+20
| | | | | | | user-defined-floating-literal. Support for raw forms of these literals to follow. llvm-svn: 152302
* User-defined literal support for character literals.Richard Smith2012-03-081-1/+24
| | | | llvm-svn: 152277
* AST representation for user-defined literals, plus just enough of semanticRichard Smith2012-03-071-5/+17
| | | | | | | | | | | | | | | | | | | | | 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
* User-defined literals: reject string and character UDLs in all places where theRichard Smith2012-03-061-0/+60
grammar requires a string-literal and not a user-defined-string-literal. The two constructs are still represented by the same TokenKind, in order to prevent a combinatorial explosion of different kinds of token. A flag on Token tracks whether a ud-suffix is present, in order to prevent clients from needing to look at the token's spelling. llvm-svn: 152098
OpenPOWER on IntegriCloud