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 | 5264f163e21c3304450b36d1bc10a8c2f4a41aef (patch) | |
| tree | 346788200d14c96c1714ce42f3068547cb0c334b /lib/Lex/HeaderSearch.cpp | |
| parent | 1a341b460ea88087d9db0b0952d2f34277b7b205 (diff) | |
| download | clang-5264f163e21c3304450b36d1bc10a8c2f4a41aef.tar.gz | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
| -rw-r--r-- | lib/Lex/HeaderSearch.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 8b6a19e080..e9542b8d16 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/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(); } |
