[Preprocessor] Correct internal token parsing of newline characters in CRLF
Correct implementation: Apparently I managed in r311683 to submit the wrong version of the patch for this, so I'm correcting it now. Differential Revision: https://reviews.llvm.org/D37079 llvm-svn: 312542
This commit is contained in:
parent
1aa667fe64
commit
e916d54614
|
@ -3071,10 +3071,11 @@ LexNextToken:
|
|||
Kind = tok::unknown;
|
||||
break;
|
||||
|
||||
case '\n':
|
||||
case '\r':
|
||||
if (CurPtr[0] != Char && (CurPtr[0] == '\n' || CurPtr[0] == '\r'))
|
||||
if (CurPtr[0] == '\n')
|
||||
Char = getAndAdvanceChar(CurPtr, Result);
|
||||
LLVM_FALLTHROUGH;
|
||||
case '\n':
|
||||
// If we are inside a preprocessor directive and we see the end of line,
|
||||
// we know we are done with the directive, so return an EOD token.
|
||||
if (ParsingPreprocessorDirective) {
|
||||
|
|
Loading…
Reference in New Issue