mgorny added a comment. To be honest, as I said before, I'm entirely confused by the logic there, with all the prepending, appending and shuffling around. But if you believe it gives the correct result, I'm all for it.
However, if that wouldn't be too much of a hassle, would you mind also renaming the variables to use a bit more meaningful names? My alternative idea would be to put both paths on the initial list, and filter out None instances from the list afterwards, e.g. something like: paths = [getattr(self.config, 'clang_tools_dir', None), self.config.llvm_tools_dir] paths = [x for x in paths if x is not None] https://reviews.llvm.org/D40217 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits