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

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


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