summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/lex
Commit message (Collapse)AuthorAgeFilesLines
* [C++20] Implement context-sensitive header-name lexing and pp-import parsing ↵Richard Smith2019-04-113-0/+83
| | | | | | in the preprocessor. llvm-svn: 358231
* 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
* Add driver flags -ftrigraphs, -fno-trigraphs.Nico Weber2014-12-233-3/+3
| | | | | | | | | | | | | | | | | -trigraphs is now an alias for -ftrigraphs. -fno-trigraphs makes it possible to explicitly disable trigraphs, which couldn't be done before. clang -std=c++11 -fno-trigraphs now builds without GNU extensions, but with trigraphs disabled. Previously, trigraphs were only disabled in GNU modes or with -std=c++1z. Make the new -f flags the cc1 interface too. This requires changing -trigraphs to -ftrigraphs in a few cc1 tests. Related to PR21974. llvm-svn: 224790
* 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
* Test that we correctly handle reversion of line splicing etc in raw stringRichard Smith2013-01-171-0/+4
| | | | | | literals. As suggested by Sean Silva. llvm-svn: 172694
* 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-192-0/+2
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Improve diagnostics for UCNs referring to control characters and members of theRichard Smith2012-03-092-0/+97
| | | | | | | | | | basic source character set in C++98. Add -Wc++98-compat diagnostics for same in literals in C++11. Extend such support to cover string literals as well as character literals, and mark N2170 as done. This seems too minor to warrant a release note to me. Let me know if you disagree. llvm-svn: 152444
* 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-133-3/+3
| | | | | | -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
* Implement C++0x [lex.pptoken]p3's handling of <::.Richard Smith2011-04-141-0/+11
| | | | llvm-svn: 129525
* Fix for PR6220: compute the correct type for multicharacter literals.Eli Friedman2010-02-031-0/+9
| | | | llvm-svn: 95228
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-153-3/+3
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Tests for C++ lex.trigraph, patch by Mats!Daniel Dunbar2009-08-233-0/+30
llvm-svn: 79841
OpenPOWER on IntegriCloud