AaronBallman wrote: > If part of the -I search path cannot be accessed (permissions), clang will > throw an error, even if the header can be found in subsequent search path > elements. This is counter productive as the compilation will seem to have > failed due to that error, even though everyone is happy.
I'm less certain that everyone is happy in that scenario. A search path that cannot be accessed may also have the requested file, so continuing to the point you find something else may not be a reasonable recovery path. Generally speaking, invalid command line arguments (which I think an inaccessible path qualifies as), are things we diagnose as errors because we cannot be certain we're producing a valid binary. On the other hand, we are silent about unknown paths. Is an inaccessible path materially different from a path which does not exist? Maybe. In both cases, there's no path there to search and so an unintended file could be picked up. But "this path exists and you cannot use it" is still different from "this path doesn't exist". Maybe we should emit a warning in this case so it's not a silent situation? CC @MaskRay @jansvoboda11 @rnk https://github.com/llvm/llvm-project/pull/177582 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
