Issue 133108
Summary [clang-tidy] "modernize-use-emplace" does not provide diagnostic for `std::optional`
Labels clang-tidy
Assignees
Reporter denzor200
    
```
std::vector<std::pair<std::string, int>> v;
v.push_back(std::pair<std::string, int>("first", 1)); // OK - clang tidy provides warnings for that

std::optional<std::pair<std::string, int>> o;
o = std::pair<std::string, int>{"first", 1};          // BAD - silence
```

The full snippet here: https://godbolt.org/z/nW9dKscqo

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to