comparison clang/lib/Lex/PPLexerChange.cpp @ 152:e8a9b4f4d755

pull from 146
author anatofuz
date Wed, 11 Mar 2020 18:29:16 +0900
parents 1d019706d866
children f935e5e0dbe7
comparison
equal deleted inserted replaced
151:dbda48fb9435 152:e8a9b4f4d755
467 SourceMgr.getFileCharacteristic(CurPPLexer->getSourceLocation()); 467 SourceMgr.getFileCharacteristic(CurPPLexer->getSourceLocation());
468 Callbacks->FileChanged(CurPPLexer->getSourceLocation(), 468 Callbacks->FileChanged(CurPPLexer->getSourceLocation(),
469 PPCallbacks::ExitFile, FileType, ExitedFID); 469 PPCallbacks::ExitFile, FileType, ExitedFID);
470 } 470 }
471 471
472 #ifndef noCbC
473 if (SavedTokenFlag && IncludeMacroStack.size() == SavedDepth){
474 Result = SavedToken;
475 SavedTokenFlag = false;
476 if (CurLexer->ParsingPreprocessorDirective) {
477 // Done parsing the "line".
478 CurLexer->ParsingPreprocessorDirective = false;
479
480 // Restore comment saving mode, in case it was disabled for directive.
481 CurLexer->resetExtendedTokenMode();
482
483 // Since we consumed a newline, we are back at the start of a line.
484 CurLexer->IsAtStartOfLine = true;
485 CurLexer->IsAtPhysicalStartOfLine = true;
486 }
487 return true;
488 }
489 #endif
490
472 // Restore conditional stack from the preamble right after exiting from the 491 // Restore conditional stack from the preamble right after exiting from the
473 // predefines file. 492 // predefines file.
474 if (ExitedFromPredefinesFile) 493 if (ExitedFromPredefinesFile)
475 replayPreambleConditionalStack(); 494 replayPreambleConditionalStack();
476 495