diff options
| author | Reid Kleckner <rnk@google.com> | 2019-08-09 19:49:14 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2019-08-09 19:49:14 +0000 |
| commit | 50fcf7285eeb001d751eadac5d001a0e216fd701 (patch) | |
| tree | 642e9014a9626fc804c7fc82c12ee279eb29b869 /clang/lib | |
| parent | 867dbf288309b30ff0d3301c7f717c2a28ca1808 (diff) | |
| download | bcm5719-llvm-50fcf7285eeb001d751eadac5d001a0e216fd701.tar.gz bcm5719-llvm-50fcf7285eeb001d751eadac5d001a0e216fd701.zip | |
Don't diagnose errors when a file matches an include component
This regressed in r368322, and was reported as PR42948 and on the
mailing list. The fix is to ignore the specific error code for this
case. The problem doesn't seem to reproduce on Windows, where a
different error code is used instead.
llvm-svn: 368475
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp index 8b6a19e080f..e9542b8d16a 100644 --- a/clang/lib/Lex/HeaderSearch.cpp +++ b/clang/lib/Lex/HeaderSearch.cpp @@ -316,7 +316,8 @@ const FileEntry *HeaderSearch::getFileAndSuggestModule( // message. std::error_code EC = File.getError(); if (EC != std::errc::no_such_file_or_directory && - EC != std::errc::invalid_argument && EC != std::errc::is_a_directory) { + EC != std::errc::invalid_argument && EC != std::errc::is_a_directory && + EC != std::errc::not_a_directory) { Diags.Report(IncludeLoc, diag::err_cannot_open_file) << FileName << EC.message(); } |

