DeinAlptraum wrote:

Hey, sorry for the delay.
Hm I see. I'm not entirely sure what the doc comment is pointing at exactly: 
being included as the source or the target of the inclusion. 
But it seems the `depth > 0` condition does indeed do what you say... removing 
that one gives a
source = None, target = root file
as the first entry returned by the iterator. So it seems like the `depth > 0` 
bug fix just dropped the correct first file (as that's also what the C-side 
returns still) and no one remembered to adapt the doc comment.

That said, I'm not sure that adapting the doc comment is the correct fix here, 
since the bug fix itself already makes the Python bindings inconsistent with 
the C-side.

@Endilll what do you think about this?
Sounds to me like the better fix would be removing the `depth > 0` in Python 
for consistency with the C implementation. But this has been the behavior of 
the Python bindings for 15 years now, and this would be a breaking change.

https://github.com/llvm/llvm-project/pull/222239
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to