llvm-project
llvm-project copied to clipboard
Annotate more functions in std:: for statement-local analysis
We could annotate functions such as std::min and similar to enable analysis of
int v = 3;
int &i = std::max(v+1, v);
We can either
- Add appropriate annotations to libc++
- Hardcode the specific annotations in clang (i.e. lifetime(ret, {a, b}))
- Hardcode the fact that inferred annotations are correct, and then infer annotations
fyi @Xazax-hun