https://github.com/zwuis commented:
Is it handled correctly?
```cpp
template <typename R> R f() {
return "str";
}
template std::string f();
```
If not, we could set the traversal kind of this check to
`TK_IgnoreUnlessSpelledInSource` to fix it. But I'm not sure if it breaks other
tests.
---
Please add tests with literals (`"str"s` and `"str"sv`).
---
I prefer "misc-use-string-view" because there is not only one reason to use it.
- Doesn't copy underlying string.
- Cheap to copy.
- Can take both `std::string` and string literals (`"str"`).
https://github.com/llvm/llvm-project/pull/172170
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits