Skip to content

llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h: 3 * redundant condition ? #90326

@dcb314

Description

@dcb314

Static analyser cppcheck says:

llvm/include/llvm/DebugInfo/LogicalView/Core/LVObject.h:249:29: style: Redundant condition: Parent.Element. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition]

Source code is

assert((!Parent.Element ||
        (Parent.Element && static_cast<LVElement *>(Parent.Element))) &&
       "Invalid element");

Duplicates with the scope and the symbol a few lines later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions