[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 21 07:34:44 PST 2025


Xazax-hun wrote:

A moved from object could be reinitalized:
```
void test() {  
    std::vector<std::string_view> abc;  
    std::string b;  
    add(abc, std::move(b));  
    b = std::string(); // now b can be used again. 
}
````

That being said, maybe this is rare enough that we could have an opt-in warning. But we definitely cannot have something that is on by default. 

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


More information about the cfe-commits mailing list