Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][lex] Fix failures with Microsoft header search rules
`HeaderSearch` currently assumes `LookupFileCache` is eventually populated in `LookupFile`. However, that's not always the case with `-fms-compatibility` and its early returns. This patch adds a defensive check that the iterator pulled out of the cache is actually valid before using it. (This bug was introduced in D119721. Before that, the cache was initialized to `0` - essentially the `search_dir_begin()` iterator.) Reviewed By: dexonsmith, erichkeane Differential Revision: https://reviews.llvm.org/D122237
- Loading branch information