llvm-project/clang/lib/Lex
Volodymyr Sapsai 7ac737e56b [HeaderSearch] Fix processing #import-ed headers multiple times with modules enabled.
HeaderSearch was marking requested HeaderFileInfo as Resolved only based on
the presence of ExternalSource. As the result, using any module was enough
to set ExternalSource and headers unknown to this module would have
HeaderFileInfo with empty fields, including `isImport = 0`, `NumIncludes = 0`.
Such HeaderFileInfo was preserved without changes regardless of how the
header was used in other modules and caused incorrect result in
`HeaderSearch::ShouldEnterIncludeFile`.

Fix by marking HeaderFileInfo as Resolved only if ExternalSource knows
about this header.

rdar://problem/62126911

Reviewed By: bruno

Differential Revision: https://reviews.llvm.org/D80263
2020-08-20 17:41:28 -07:00
..
CMakeLists.txt Add clang source minimizer that reduces source to directives 2019-06-03 22:59:17 +00:00
DependencyDirectivesSourceMinimizer.cpp Avoid including FileSystem.h from MemoryBuffer.h 2020-02-29 12:30:23 -08:00
HeaderMap.cpp FileManager: Use llvm::Expected in new getFileRef API 2019-08-26 18:29:51 +00:00
HeaderSearch.cpp [HeaderSearch] Fix processing #import-ed headers multiple times with modules enabled. 2020-08-20 17:41:28 -07:00
Lexer.cpp [AST/Lex/Parse/Sema] As part of using inclusive language within 2020-06-20 01:15:32 -07:00
LiteralSupport.cpp Refactored NumericLiteralParser to not require a Preprocessor 2020-07-09 17:33:58 +02:00
MacroArgs.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +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 [clang] Always allow including builtin headers in [no_undeclared_headers] modules. 2020-06-04 08:33:39 +02:00
PPCaching.cpp [Lex] Allow to consume tokens while preprocessing 2019-05-17 09:32:05 +00:00
PPCallbacks.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
PPConditionalDirectiveRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
PPDirectives.cpp [OpenCL] Remove warning for variadic macros in C++ for OpenCL. 2020-08-12 16:17:54 +01:00
PPExpressions.cpp Refactored NumericLiteralParser to not require a Preprocessor 2020-07-09 17:33:58 +02:00
PPLexerChange.cpp [clang] Make sure argument expansion locations are correct in presence of predefined buffer 2020-04-22 21:01:52 +02:00
PPMacroExpansion.cpp [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
Pragma.cpp [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
PreprocessingRecord.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
Preprocessor.cpp Reland [Coverage] Add comment to skipped regions 2020-07-28 13:20:57 -07: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++2a -> C++20 in some identifiers; NFC. 2020-04-21 15:37:19 -04:00
TokenLexer.cpp Remove cache for macro arg stringization 2019-07-30 17:58:22 +00:00
UnicodeCharSets.h clang: Fix typo in comment 2019-08-21 15:41:29 +00:00