zyn0217 wrote: Thinking more, I still maintain that the check for `ParentFD` is redundant.
So, suppose we need to find a case to compromise the previous logic. In that case, we need to find a generic lambda whose `Pattern` is defined inside a function (i.e. `Pattern` is non-null) while its `Instantiation` (i.e. `ParentFD` is null) is not. I don't think that is possible because we can't instantiate any lambda definition outside the function that owns them. That being said, I think keeping the patch as-is is fine because it's more intelligible than explaining the subtle implications above. https://github.com/llvm/llvm-project/pull/96888 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits