Skip to content

clang/lib/Sema/SemaOpenMP.cpp:24351: pointless test ? #79967

@dcb314

Description

@dcb314

Static analyser cppcheck says:

clang/lib/Sema/SemaOpenMP.cpp:24351: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) {

There is just a chance some other identifier was intended. On the other hand, if it
is simple duplication, it can be removed.

Metadata

Metadata

Assignees

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