Clang-tidy: what is the proper set-up?

Can you add

check_skip_packages = yes

in the platformio.ini and retry the same command. It looks like its double-defining all compiler-specific macros for the AVR target. Use pastebin.com if the output gets too large.