[PATCH] D61707: [Preprocessor] Fix crash emitting note with framework location for "file not found" error.
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 22 14:26:11 PDT 2019
arphaman added inline comments.
================
Comment at: clang/lib/Lex/HeaderSearch.cpp:821
CurDir = nullptr;
+ bool HasBeenMapped = false;
----------------
NIT: It looks like `HasBeenMapped` should be always set when `CacheLookup.MappedName` is set as well. Would it make sense to check `CacheLookup.MappedName` instead to avoid divergence in the future? You could have a helper lambda `HasBeenMapped = [] (&) { return CacheLookup.MappedName; }` as well.
================
Comment at: clang/test/Preprocessor/include-header-missing-in-framework-with-headermap.c:10
+
+#ifdef LATE_REMAPPING
+// Framework is found before remapping.
----------------
would it make sense to exercise both #ifdef in the test in the two clang invocations, but guard the expected-errors with the `#ifdef`? This way the test can ensure that the error is not emitted in the other invocation.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61707/new/
https://reviews.llvm.org/D61707
More information about the cfe-commits
mailing list