What other headers have you included in the file you’re compiling?
<stdatomic.h> is getting included at some point. This is a C header, which gives you atomic_is_lock_free in the global namespace, as defined in the C standard. Evidently this is implemented in clang as a macro which is why you get that particular error message.
You’re writing C++ code, which means you should be using <atomic> which is the C++ header. This would give you std::atomic_is_lock_free in the std namespace, and you wouldn’t have a problem.
The clang version isn’t too old (well, it is and this causes other issues if you use std::variant, but it’s not what’s causing this problem).
It seems ROOT is automatically including <stdatomic.h> when it should be including <atomic>. This may be because you have #include <stdatomic.h> in a startup file (like .rootlogon.C), or it’s a configuration issue with the way you built ROOT.