llvm-project/clang/lib/Lex
Richard Smith 75f9681874 Remove use of lookahead from _Pragma handling and from all other
internal lexing steps in the preprocessor.

It is not safe to use the preprocessor's token lookahead except when
operating on the final sequence of tokens that would be produced by
phase 4 of translation. Doing so corrupts the token lookahead cache used
by the parser. (See added testcase for an example.) Lookahead should
instead be viewed as a layer on top of the normal lexer.

Added assertions to catch any further incorrect uses of lookahead within
lexing actions.

llvm-svn: 358230
2019-04-11 21:18:22 +00:00
..
CMakeLists.txt PTH-- Remove feature entirely- 2018-12-04 14:34:09 +00:00
HeaderMap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
HeaderSearch.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00
Lexer.cpp Replace tok::angle_string_literal with new tok::header_name. 2019-03-19 22:09:55 +00:00
LiteralSupport.cpp [CUDA][HIP] Do not diagnose use of _Float16 2019-01-29 13:20:23 +00:00
MacroArgs.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MacroInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleMap.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00
PPCaching.cpp Remove use of lookahead from _Pragma handling and from all other 2019-04-11 21:18:22 +00:00
PPCallbacks.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPConditionalDirectiveRecord.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPDirectives.cpp Remove use of lookahead from _Pragma handling and from all other 2019-04-11 21:18:22 +00:00
PPExpressions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPLexerChange.cpp Basic: Return a reference from FileManager::getVirtualFileSystem, NFC 2019-03-26 22:32:06 +00:00
PPMacroExpansion.cpp Replace tok::angle_string_literal with new tok::header_name. 2019-03-19 22:09:55 +00:00
Pragma.cpp Remove use of lookahead from _Pragma handling and from all other 2019-04-11 21:18:22 +00:00
PreprocessingRecord.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Preprocessor.cpp Remove use of lookahead from _Pragma handling and from all other 2019-04-11 21:18:22 +00:00
PreprocessorLexer.cpp Factor out repeated code parsing and concatenating header-names from 2019-03-19 01:51:19 +00:00
ScratchBuffer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenConcatenation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TokenLexer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnicodeCharSets.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00