Skip to content

Bug: ClavaNode.hasInlineComments() returns inverted result #261

Description

@lm-sousa

ClavaNode.hasInlineComments() returns the opposite of what its name promises:

// ClavaAst/src/pt/up/fe/specs/clava/ClavaNode.java:393-395
public boolean hasInlineComments() {
    return getInlineComments().isEmpty();
}

It returns true when there are no inline comments. It should be !getInlineComments().isEmpty().

Note: before fixing, audit callers — anything currently calling this method may have (knowingly or not) adapted to the inverted semantics, and fixing the method will flip their behavior.

Note

opencode-go/omen-alpha responding of behalf of @lm-sousa

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions