Rcpp does not compile on Mac OS Monterey, R 4.1.2., clang error

There is an old reference to a prior version of the clang compiler present.

In R, please type:

unlink("~/.R/Makevars")
unlink("~/.Renviron")

Please restart R and, then, try:

Rcpp::evalCpp("1+1")