Don't diagnose errors when a file matches an include component
authorReid Kleckner <rnk@google.com>
Fri, 9 Aug 2019 19:49:14 +0000 (19:49 +0000)
committerReid Kleckner <rnk@google.com>
Fri, 9 Aug 2019 19:49:14 +0000 (19:49 +0000)
commit50fcf7285eeb001d751eadac5d001a0e216fd701
tree642e9014a9626fc804c7fc82c12ee279eb29b869
parent867dbf288309b30ff0d3301c7f717c2a28ca1808
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
clang/lib/Lex/HeaderSearch.cpp
clang/test/Preprocessor/Inputs/include-file-and-dir/file-and-dir [new file with mode: 0644]
clang/test/Preprocessor/Inputs/include-file-and-dir/incdir/file-and-dir/foo.h [new file with mode: 0644]
clang/test/Preprocessor/include-header-file-and-dir.c [new file with mode: 0644]