Update 2019-07-16: this no longer works for me. I recommend you brew uninstall llvm, comment out the .R/Makevars lines and conda install llvm.
You can file this one under “I may have the very specific solution if you’re having exactly the same problem.”
So: if you’re running some R code and you see a warning like this:
Warning message: In checkMatrixPackageVersion() : Package version inconsistency detected. TMB was built with Matrix version 1.2.14 Current Matrix version is 1.2.15 Please re-install 'TMB' from source using install.packages('TMB', type = 'source') or ask CRAN for a binary version of 'TMB' matching CRAN's 'Matrix' package