Skip to content

clang/lib/Sema/SemaOpenMP.cpp:24774: Pointless test ? #95670

Open
@dcb314

Description

@dcb314

Static analyser cppcheck says:

clang/lib/Sema/SemaOpenMP.cpp:24774:57: style: Same expression 'DepType!=OMPC_DOACROSS_source' found multiple times in chain of '&&' operators. [duplicateExpression]

Source code is

if (DSAStack->getCurrentDirective() == OMPD_ordered &&
DepType != OMPC_DOACROSS_source && DepType != OMPC_DOACROSS_sink &&
DepType != OMPC_DOACROSS_sink_omp_cur_iteration &&
DepType != OMPC_DOACROSS_source_omp_cur_iteration &&
DepType != OMPC_DOACROSS_source) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"code-quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions