llvm-project/clang/lib/Lex
Nikolai Kosjar 3c28a2dc6b [Preamble] Stop circular inclusion of main file when building preamble
If a header file was processed for the second time, we could end up with a
wrong conditional stack and skipped ranges:

In the particular example, if the header guard is evaluated the second time and
it is decided to skip the conditional block, the corresponding "#endif" is
never seen since the preamble does not include it and we end up in the
Tok.is(tok::eof) case with a wrong conditional stack.

Detect the circular inclusion, emit a diagnostic and stop processing the
inclusion.

llvm-svn: 360418
2019-05-10 10:25:35 +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 [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path 2019-04-24 09:23:31 +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 [c++20] Implement tweaked __VA_OPT__ rules from P1042R1: 2019-05-04 06:46:18 +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 [c++2a] Add semantic support for private module fragments. 2019-04-18 21:12:54 +00:00
PPCaching.cpp [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +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 [Preamble] Stop circular inclusion of main file when building preamble 2019-05-10 10:25:35 +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 -frewrite-imports: Add support for wildcard rules in umbrella modules with 2019-05-07 21:38:51 +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 When skipping code at the start of a file during PCH use, Preprocessor::Lex 2019-04-29 21:21:17 +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 [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
TokenLexer.cpp [c++20] Implement tweaked __VA_OPT__ rules from P1042R1: 2019-05-04 06:46:18 +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