Annotations improve the accuracy of the code analysis. Annotations provide additional information about pre- and post- conditions on function parameters and return types.
#include <CodeAnalysis/SourceAnnotations.h>
[returnvalue:Post( MustCheck=SA_Yes )] double* CalcSquareRoot
(
[Pre( Null=SA_No )] double* source,
unsigned int size
);
In the preceding example:
[Post ( MustCheck=SA_Yes)] requires caller to check the return value of CalcSquareRoot
[Pre ( Null=SA_No)] requires caller to pass non-null parameter "source" to CalcSquareRoot