- Where compiler should report error, on call
bar()
on inside body of bar atc.length
? - Which function calls should be checked by compiler – only
private inline
? Actually there is no difference in that case betweenprivate inline
and all others functions that have reference to leakingthis
(member or not) - What if
bar
calls some other member function, that possibly access uninitializedc
? Should compiler checks it’s body too?
Actually, as @Wasabi375 described, it’s possible to add such “cross-function” analysis, but it will lead to dramatically increasing of compilation time, because of each function call can run separate analysis of whole project, so it won’t be implemented in compiler. Current version of analysis works with O(LOC) asymptotic