aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-08-08 17:58:32 +0000
committerNico Weber <nicolasweber@gmx.de>2019-08-08 17:58:32 +0000
commitbabdfdec90bb978799bcccf1ee0c856678b0ef7b (patch)
treeea34414cf81085177140f5e70a4f310a4be9fb08 /clang/lib/Frontend/CompilerInvocation.cpp
parent5b40eb0572256d8f9606ac17397dafa6137e96fc (diff)
downloadllvm-babdfdec90bb978799bcccf1ee0c856678b0ef7b.zip
llvm-babdfdec90bb978799bcccf1ee0c856678b0ef7b.tar.gz
llvm-babdfdec90bb978799bcccf1ee0c856678b0ef7b.tar.bz2
clang: Diag running out of file handles while looking for files
clang would only print "file not found" when it's unable to find a header file. If the reason for that is a file handle leak, that's not a very useful error message. For errors that aren't in a small whitelist ("file not found", "file is directory"), print an error with the strerror() output. This changes behavior in corner cases: If clang was out of file handles while looking in one -I dir but then suddenly wasn't when looking in the next -I dir, and both directories contained a file with the desired name, previously we'd silently return the file from the second directory. For this reason, it's important to ignore "is a directory" for this new diag: if a file foo/foo exists and -I -Ifoo are passed, an include of "foo" should successfully open file "foo" in directory "foo/" instead of complaining that "./foo" is a directory. No test since we mostly hit this when there's a handle leak somewhere, and currently there isn't one. I manually tested this with the repro steps in comment 2 on the bug below. Fixes PR42524. Differential Revision: https://reviews.llvm.org/D65956 llvm-svn: 368322
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions