aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/TokenConcatenation.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-06-18[clang] Refactoring of conditions so they use isOneOf() instead of multiple ↵Daniel Marjamaki1-10/+10
is(). llvm-svn: 240008
2014-11-08[c++1z] Support for u8 character literals.Richard Smith1-1/+7
llvm-svn: 221576
2014-09-10Avoid a couple of assertions when preprocessing with modulesBen Langmuir1-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
2014-01-30Revert "Fix assertion failures on annot_* tokens in clang -E"Ben Langmuir1-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
2014-01-30Fix assertion failures on annot_* tokens in clang -EBen Langmuir1-3/+6
In particular, #pragma clang __debug, and #include implicitly changed into @import were causing assertion failures. llvm-svn: 200475
2013-02-08Simplify logic for avoiding concatenation after numeric constants.Jordan Rose1-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
2013-01-29[Preprocessor] When checking if we can concatenate two tokens, checkArgyrios Kyrtzidis1-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
2013-01-02s/CPlusPlus0x/CPlusPlus11/gRichard Smith1-10/+10
llvm-svn: 171367
2012-08-10Add missing cctype includes.Joerg Sonnenberger1-0/+1
llvm-svn: 161660
2012-03-11Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie1-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
2012-03-06User-defined literals: reject string and character UDLs in all places where theRichard Smith1-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
2012-01-17Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie1-2/+0
appropriate or when GCC requires it) llvm-svn: 148292
2011-09-19Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis1-1/+1
It already works (and is useful with) macro locs as well. llvm-svn: 140057
2011-08-11Raw string followup. Pass a couple StringRefs by value.Craig Topper1-1/+1
llvm-svn: 137301
2011-08-11Add support for C++0x raw string literals.Craig Topper1-17/+31
llvm-svn: 137298
2011-07-27Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor1-36/+28
llvm-svn: 136210
2010-12-22Introduced raw_identifier token kind.Abramo Bagnara1-1/+9
llvm-svn: 122394
2010-04-14make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."Chris Lattner1-2/+4
when avoiding paste. Patch by David Peixotto! llvm-svn: 101218
2010-03-26fix a bug in paste avoidance which would cause us to accidentallyChris Lattner1-1/+1
form a >>=. Patch by Abramo Bagnara, testcase by me. llvm-svn: 99624
2009-10-18Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar1-1/+1
llvm-svn: 84436
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump1-21/+21
llvm-svn: 81346
2009-06-15PR4395: Don't detect token concatenation in C mode for Eli Friedman1-3/+5
C++-specific tokens. llvm-svn: 73408
2009-05-27Don't vary token concatenation based on the language options; this Eli Friedman1-6/+3
behavior is more likely to be confusing than useful. llvm-svn: 72499
2009-04-21apply Eli's patch to fix PR4008, with a testcase. Thanks Eli!Chris Lattner1-0/+8
llvm-svn: 69750
2009-03-18Fix -E mismatch; an identifier followed by a numeric constant does notDaniel Dunbar1-22/+31
require a space (to avoid concatenation) if the numeric constant had a leading period. - PR3819. llvm-svn: 67163
2009-02-13factor token concatenation avoidance logic out of Chris Lattner1-0/+205
PrintPreprocessedOutput into its own file. No functionality change. llvm-svn: 64418