summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/TokenConcatenation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Now that C++17 is official (https://www.iso.org/standard/68564.html), start ↵Aaron Ballman2017-12-041-2/+2
| | | | | | changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes. llvm-svn: 319688
* [c++2a] P0515R3: lexer support for new <=> token.Richard Smith2017-12-011-0/+6
| | | | llvm-svn: 319509
* [PP] Replace some index based for loops with range based onesErik Verbruggen2016-10-261-1/+1
| | | | | | | | | While in the area, also change some unsigned variables to size_t, and introduce an LLVM_FALLTHROUGH instead of a comment stating that. Differential Revision: http://reviews.llvm.org/D25982 llvm-svn: 285193
* [clang] Refactoring of conditions so they use isOneOf() instead of multiple ↵Daniel Marjamaki2015-06-181-10/+10
| | | | | | is(). llvm-svn: 240008
* [c++1z] Support for u8 character literals.Richard Smith2014-11-081-1/+7
| | | | llvm-svn: 221576
* Avoid a couple of assertions when preprocessing with modulesBen Langmuir2014-09-101-2/+10
| | | | | | | | | | | | | | | | 1. We were hitting the NextIsPrevious assertion because we were trying to merge decl chains that were independent of each other because we had no Sema object to allow them to find existing decls. This is fixed by delaying loading the "preloaded" decls until Sema is available. 2. We were trying to get identifier info from an annotation token, which asserts. The fix is to special-case the module annotations in the preprocessed output printer. Fixed in a single commit because when you hit 1 you almost invariably hit 2 as well. llvm-svn: 217550
* Revert "Fix assertion failures on annot_* tokens in clang -E"Ben Langmuir2014-01-301-6/+3
| | | | | | | This is causing a failure in the msan buildbot that I am having trouble reproducing. Reverting until I can figure out what went wrong. llvm-svn: 200492
* Fix assertion failures on annot_* tokens in clang -EBen Langmuir2014-01-301-3/+6
| | | | | | | In particular, #pragma clang __debug, and #include implicitly changed into @import were causing assertion failures. llvm-svn: 200475
* Simplify logic for avoiding concatenation after numeric constants.Jordan Rose2013-02-081-6/+5
| | | | | | | I threw in a couple of test cases for UD-suffixes -- already working, but it wasn't immediately obvious to me. llvm-svn: 174767
* [Preprocessor] When checking if we can concatenate two tokens, checkArgyrios Kyrtzidis2013-01-291-3/+4
| | | | | | | | | | | | if they were already concatenated in source using the spelling locations even if they came from a macro expansion. This fixes an issue where a GUID passed as macro argument ends up malformed after preprocessing because we added spaces inside it. rdar://13016645 llvm-svn: 173826
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-10/+10
| | | | llvm-svn: 171367
* Add missing cctype includes.Joerg Sonnenberger2012-08-101-0/+1
| | | | llvm-svn: 161660
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-7/+7
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* User-defined literals: reject string and character UDLs in all places where theRichard Smith2012-03-061-1/+38
| | | | | | | | | | 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
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-2/+0
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Raw string followup. Pass a couple StringRefs by value.Craig Topper2011-08-111-1/+1
| | | | llvm-svn: 137301
* Add support for C++0x raw string literals.Craig Topper2011-08-111-17/+31
| | | | llvm-svn: 137298
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-271-36/+28
| | | | llvm-svn: 136210
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-221-1/+9
| | | | llvm-svn: 122394
* make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."Chris Lattner2010-04-141-2/+4
| | | | | | when avoiding paste. Patch by David Peixotto! llvm-svn: 101218
* fix a bug in paste avoidance which would cause us to accidentallyChris Lattner2010-03-261-1/+1
| | | | | | form a >>=. Patch by Abramo Bagnara, testcase by me. llvm-svn: 99624
* Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar2009-10-181-1/+1
| | | | llvm-svn: 84436
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-21/+21
| | | | llvm-svn: 81346
* PR4395: Don't detect token concatenation in C mode for Eli Friedman2009-06-151-3/+5
| | | | | | C++-specific tokens. llvm-svn: 73408
* Don't vary token concatenation based on the language options; this Eli Friedman2009-05-271-6/+3
| | | | | | behavior is more likely to be confusing than useful. llvm-svn: 72499
* apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!Chris Lattner2009-04-211-0/+8
| | | | llvm-svn: 69750
* Fix -E mismatch; an identifier followed by a numeric constant does notDaniel Dunbar2009-03-181-22/+31
| | | | | | | | require a space (to avoid concatenation) if the numeric constant had a leading period. - PR3819. llvm-svn: 67163
* factor token concatenation avoidance logic out of Chris Lattner2009-02-131-0/+205
PrintPreprocessedOutput into its own file. No functionality change. llvm-svn: 64418
OpenPOWER on IntegriCloud