Remix.run Logo
charcircuit 10 hours ago

I don't understand the downvoted here. Either the compiler emits the code to call a move constructor or it doesn't.

Maxatar 10 hours ago | parent [-]

Static analysis is about proving whether the code emitted by a compiler is actually called at runtime. It's not simply about the presence of that code.

Code can be emitted but never executed.

charcircuit 2 hours ago | parent [-]

>Static analysis is about proving whether the code emitted by a compiler is actually called at runtime.

That is but one thing that can static analysis can prove. It can also prove whether source code will call a move contractor or a copy constructor. Static analysis is about analyzing a program without actually running it. Analysizing what code is emitted is one way a program can be analyzed.