Skip to content

v0.0-310-ga9d1b64: Lint: Make acceptance of anonymous nested structs configurable.

Compare
Choose a tag to compare
@symbiflow-robot symbiflow-robot released this 24 Mar 21:29
This adds 'allow_anonymous_nested' configuration to the 'typedef-structs-unions'
rule to allow not to require a typedef for inner structs.

In the course of that, implement SyntaxTreeContext::IsInsideStartingFrom()
which starts looking backward the stack starting with an offset.

(As a side effect, make IsInside() to start looking from top of stack
instead of bottom, which is conceptually more aligned of what we expect,
even though it makes only a difference in this case (offset 0))

Fixes #128

PiperOrigin-RevId: 302738764