================ @@ -30,11 +30,16 @@ SanitizerSpecialCaseList::create(const std::vector<std::string> &Paths, std::unique_ptr<SanitizerSpecialCaseList> SanitizerSpecialCaseList::createOrDie(const std::vector<std::string> &Paths, - llvm::vfs::FileSystem &VFS) { + llvm::vfs::FileSystem &VFS, + DiagnosticsEngine &Diags) { std::string Error; if (auto SSCL = create(Paths, VFS, Error)) return SSCL; - llvm::report_fatal_error(StringRef(Error)); + unsigned DiagID = Diags.getCustomDiagID(clang::DiagnosticsEngine::Error, + "failed to load NoSanitize file: %0"); ---------------- MaskRay wrote:
I agree that ideally this error reporting is delayed. createOrDie is called by NoSanitizeList::NoSanitizeList, which is called by ASTContext::ASTContext. To report a proper diagnostic, we need to remove these calls from ctors to an init function. https://github.com/llvm/llvm-project/pull/147959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits