Issue 233463
Summary [clang-tidy] False positive report from readability-redundant-parentheses in C++20
Labels
Assignees
Reporter ns-osmolsky
    Reduced repro, C++20 mode:
```
#include <array>
#include <string_view>

template <const std::string_view &Pattern, size_t Repeat>
struct RepeatPattern {
 static auto impl()
    {
        return std::array<char, Pattern.size() * Repeat>{};        // false positive report on this line
 }
};

constexpr std::string_view PATTERN = "whatever";

auto Array = RepeatPattern<PATTERN, 10>::impl();
```

Report:
```
repro.cpp:8:33: error: redundant parentheses around _expression_ [readability-redundant-parentheses,-warnings-as-errors]
    8 | return std::array<char, Pattern.size() * Repeat>{};
      | ^~~~~~~

```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to