Issue |
142918
|
Summary |
[clang-tidy] readability-redundant-member-init: flag assignment with std::nullopt
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
chrchr-github
|
~~~c++
#include <optional>
struct S {
std::optional<int> o1 = {};
std::optional<int> o2 = std::nullopt; // warn here
};
~~~
~~~
<source>:4:27: warning: initializer for member 'o1' is redundant [readability-redundant-member-init]
4 | std::optional<int> o1 = {};
|
~~~
https://godbolt.org/z/jzTcf5rs1
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs