diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2022-03-22 17:03:58 +0100 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2022-03-23 14:49:17 +0100 |
commit | 59dadd178b0b12cb4a975a262ed20e7c3822aedc (patch) | |
tree | c22de76253e94a64bbe485cbf42ce75e75196457 /llvm/docs/tutorial/MyFirstLanguageFrontend | |
parent | 9a6e0afac5bf117bdd0bbc82937e04f0edb7f305 (diff) | |
download | llvm-59dadd178b0b12cb4a975a262ed20e7c3822aedc.zip llvm-59dadd178b0b12cb4a975a262ed20e7c3822aedc.tar.gz llvm-59dadd178b0b12cb4a975a262ed20e7c3822aedc.tar.bz2 |
[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
Diffstat (limited to 'llvm/docs/tutorial/MyFirstLanguageFrontend')
0 files changed, 0 insertions, 0 deletions