Update diagnostic.cpp

Add description about what diagnostic.cpp does