[cfe-dev] getOuterLexicalRecordContext - bug in method of lack of comments?

via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 22 01:52:54 PDT 2019

Oh... my fault sorry. It returns nullptr, for second case.

22.04.2019, 12:28, "llvm at dyatkovskiy.com" <llvm at dyatkovskiy.com>:
> In comments to getOuterLexicalRecordContext I see only this:
>     /// Retrieve the outermost lexically enclosing record context.
> But in fact this method works a bit different:
> 1. If current DC belongs to record context or is record itself, then it retrieves the outermost lexically enclosing record context. Correct.
> 2. But. If current DC is not a record, neither it belongs to record context, then it returns current DC. Which is undocumented.
> So, should we fix method comments?
> Thanks!
> Stepan Dyatkovskiy.

More information about the cfe-dev mailing list