Skip to content

readability-else-after-return/llvm-else-after-return warn on else after if consteval #91561

@cjdb

Description

@cjdb

The following yields the aforementioned warnings, but they shouldn't.

constexpr int f()
{
  if consteval {
    return 0;
  }
  else {
    return 1;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorclang-tidygood first issuehttps://github.com/llvm/llvm-project/contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions