[clang] [clang] Fix incorrect inferred lifetime_capture_by attr on STL (PR #118013)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 29 00:16:44 PST 2024


hokein wrote:

> Can you also add a lit test for:
> 
> ```c++
> std::vector<std::string> getVector();
> std::set<std::string> s;
> s.insert(getVector().begin(), getVector().end()); // FIXME: taking iterator of a temporary container without immediate dereference is almost always wrong.
> ```

I think this is a different issue, I'd prefer not adding it to this test file.

https://github.com/llvm/llvm-project/pull/118013


More information about the cfe-commits mailing list