| Issue |
91605
|
| Summary |
[clang-tidy] `readability-redundant-member-init` warning when non-redudant
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
coryan
|
This code triggers the `readability-redundant-member-init` warning, it seems to me that this is anything but redundant:
```cc
#include <string>
#include <optional>
struct F1 {
std::optional<std::string> a = std::string{};
};
```
https://godbolt.org/z/M9ejhTTaf
Changing the `std::string{}` to `std::string{""}` makes the warning go away:
```cc
#include <string>
#include <optional>
struct F1 {
std::optional<std::string> a = std::string{""};
};
```
https://godbolt.org/z/b4hr9qd6E
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs