add function to enable and disable clang diagnostics