summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/over/over.oper
Commit message (Collapse)AuthorAgeFilesLines
* Add a note that points to the linkage specifier for the C++ linkage errorsAlex Lorenz2016-11-021-1/+3
| | | | | | | | | | | | This commit improves the "must have C++ linkage" error diagnostics that are emitted for C++ declarations like templates and literal operators by adding an additional note that points to the appropriate extern "C" linkage specifier. rdar://19021120 Differential Revision: https://reviews.llvm.org/D26189 llvm-svn: 285823
* Improve diagnostics for ill-formed literal operator declarations.Richard Smith2016-02-172-7/+7
| | | | | | Patch by Erik Pilkington! llvm-svn: 261034
* When pretty-printing a C++11 literal operator, don't insert whitespace betweenRichard Smith2015-10-081-1/+1
| | | | | | | 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
* <rdar://problem/13605348> Don't consider invalid user-defined literal ↵Douglas Gregor2013-04-101-0/+9
| | | | | | operators during overload resolution. llvm-svn: 179150
* Handle universal character names and Unicode characters outside of literals.Jordan Rose2013-01-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is a missing piece for C99 conformance. This patch handles UCNs by adding a '\\' case to LexTokenInternal and LexIdentifier -- if we see a backslash, we tentatively try to read in a UCN. If the UCN is not syntactically well-formed, we fall back to the old treatment: a backslash followed by an identifier beginning with 'u' (or 'U'). Because the spelling of an identifier with UCNs still has the UCN in it, we need to convert that to UTF-8 in Preprocessor::LookUpIdentifierInfo. Of course, valid code that does *not* use UCNs will see only a very minimal performance hit (checks after each identifier for non-ASCII characters, checks when converting raw_identifiers to identifiers that they do not contain UCNs, and checks when getting the spelling of an identifier that it does not contain a UCN). This patch also adds basic support for actual UTF-8 in the source. This is treated almost exactly the same as UCNs except that we consider stray Unicode characters to be mistakes and offer a fixit to remove them. llvm-svn: 173369
* DR1473: Do not require a space between operator"" and the ud-suffix in aRichard Smith2012-10-201-3/+2
| | | | | | literal-operator-id. llvm-svn: 166373
* 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
* PR12225: The requirement that literal operators be namespace-scope functionsRichard Smith2012-03-101-0/+2
| | | | | | does not imply that such functions can't be declared at block scope. llvm-svn: 152509
* Literal operator suffixes and regular names live in separate namespaces.Richard Smith2012-03-091-0/+6
| | | | llvm-svn: 152395
* Literal operators can't have default arguments.Richard Smith2012-03-091-0/+1
| | | | llvm-svn: 152394
* Implement C++11 [lex.ext]p10 for string and character literals: a ud-suffix notRichard Smith2012-03-081-3/+5
| | | | | | | | | | | | | | | | | | 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
* User-defined literals: reject string and character UDLs in all places where theRichard Smith2012-03-061-1/+1
| | | | | | | | | | 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
* Lexing support for user-defined literals. Currently these lex as the same tokenRichard Smith2012-03-052-2/+6
| | | | | | | kinds as the underlying string literals, and we silently drop the ud-suffix; those issues will be fixed by subsequent patches. llvm-svn: 152012
* Add tests for [over.literal]. Fix a few bugs which were exposed by the tests.Richard Smith2012-03-046-0/+130
llvm-svn: 151997
OpenPOWER on IntegriCloud