New C++ standards brought quite a lot of useful changes. There are things which we would not rush into using straight away, but there are some changes which need to be applied immediately, as they will bring with them, significant benefits. Continue reading
nullptr
Do not compare ‘this’ to nullptr anymore
The fragment is taken from CoreCLR project. This dangerous code is detected by the following diagnostic: V704 ‘this == nullptr’ expression should be avoided – this expression is always false on newer compilers, because ‘this’ pointer can never be NULL.
Continue reading
Never dereference null pointers
This bug was found in GIT‘s source code. The code contains an error that analyzer diagnoses in the following way: V595 The ‘tree’ pointer was utilized before it was verified against nullptr. Check lines: 134, 136.