llvm-project/clang/lib
Volodymyr Sapsai 2f84361684 Fix -Wnonportable-include-path suppression for header maps with absolute paths.
In `DirectoryLookup::LookupFile` parameter `HasBeenMapped` doesn't cover
the case when clang finds a file through a header map but doesn't remap
the lookup filename because the target path is an absolute path. As a
result, -Wnonportable-include-path suppression for header maps
introduced in r301592 wasn't triggered.

Change parameter `HasBeenMapped` to `IsInHeaderMap` and use parameter
`MappedName` to track the filename remapping. This way we can handle
both relative and absolute paths in header maps, and account for their
specific properties, like filename remapping being a property preserved
across lookups in multiple directories.

rdar://problem/39516483

Reviewers: dexonsmith, bruno

Reviewed By: dexonsmith

Subscribers: jkorous, cfe-commits, ributzka

Differential Revision: https://reviews.llvm.org/D58094

llvm-svn: 371655
2019-09-11 20:39:04 +00:00
..
ARCMigrate [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
AST When evaluating a __builtin_constant_p conditional, always enter 2019-09-10 21:24:09 +00:00
ASTMatchers [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Analysis [analyzer] NFC: Introduce sub-classes for path-sensitive and basic reports. 2019-09-09 20:34:40 +00:00
Basic Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
CodeGen Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2019-09-11 16:19:50 +00:00
CrossTU [CrossTU] Fix problem with CrossTU AST load limit and progress messages. 2019-08-12 07:15:29 +00:00
DirectoryWatcher [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
Driver [ARM] Take into account -mcpu and -mfpu options while handling 'crypto' feature 2019-09-11 09:06:17 +00:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] Apply BAS_AlwaysBreak to C++11 braced lists 2019-09-10 23:26:45 +00:00
Frontend Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM" 2019-09-11 16:19:50 +00:00
FrontendTool [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
Headers [PowerPC][Altivec] Fix constant argument for vec_dss 2019-09-04 14:01:47 +00:00
Index [clang][Index] Replace CodegenNameGenerator with ASTNameGenerator 2019-09-05 20:33:52 +00:00
Lex Fix -Wnonportable-include-path suppression for header maps with absolute paths. 2019-09-11 20:39:04 +00:00
Parse Diagnose _Atomic as a C11 extension. 2019-09-04 21:01:57 +00:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [MS] Consder constexpr globals to be inline, as in C++17 2019-09-11 18:09:10 +00:00
Serialization [Sema] Diagnose default-initialization, destruction, and copying of 2019-09-07 00:34:43 +00:00
StaticAnalyzer [analyzer] NFC: Simplify bug report equivalence classes to not be ilists. 2019-09-09 20:34:44 +00:00
Tooling [Driver] Use shared singleton instance of DriverOptTable 2019-09-04 14:26:28 +00:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00