Jim added a comment. I think this checking should be implemented in lib/Sema/SemaChecking.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66839/new/ https://reviews.llvm.org/D66839