[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 29 04:09:42 PDT 2024
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
More information about the cfe-commits
mailing list