I have the exact same error as here: Rstudio does not display correct C++ diagnostics; libclang error
I have the same problem on two totally separate machines (one Windows and one macOS) using the latest stable versions of RStudio, R, and Rcpp. The diagnostics claim that the objects are integers when they are actually, for example, of class Rcpp::NumericVector.
I would think that lots of others would be having this same error as well? Has anyone else experienced this issue? Does anyone have any ideas for how to address it?