Skip to content

clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp:92: Possible && || mixup ? #128210

@dcb314

Description

@dcb314

A recent build of clang by gcc says:

clang/lib/CodeGen/HLSLBufferLayoutBuilder.cpp:92:58: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]

Source code is

  assert(!Packoffsets || Index < Packoffsets->size() &&
                             "number of elements in layout struct does not "
                             "match number of packoffset annotations");

Suggest add ( and ) to make intention clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HLSLHLSL Language Supportclang:codegenIR generation bugs: mangling, exceptions, etc.code-quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions