c++static-analysissal

SAL annotations and pointer parameters


I have been reading about SAL and I'm not clear on if annotations on pointer types apply to the reference or the value it points to. For example, if I have:

void f(_In_ type* t);

_In_ means "The parameter must be valid in pre-state and will not be modified." Does its application here mean that the address of t will not change, or the value of t?


Solution

  • In your example, _In_ means that