[clang] fix: replace report_fatal_error with Diags and exit (PR #147959)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 23:53:44 PDT 2025
================
@@ -1697,6 +1698,15 @@ ASTContext::getRelocationInfoForCXXRecord(const CXXRecordDecl *RD) const {
return std::nullopt;
}
+void ASTContext::initSanitizers(const LangOptions &LangOpts,
+ SourceManager &SM) {
+ std::string Error;
+ if (!NoSanitizeL->init(LangOpts.NoSanitizeFiles, Error)) {
+ const std::string &Path = LangOpts.NoSanitizeFiles.front();
----------------
woruyu wrote:
I decided to go with:
```
def err_sanitize_ignorelist_failure : Error<
"failed to sanitize ignorelist file: %0">;
```
instead of
```
def err_no_sanitize_file_failure : Error<
"failed to %select{load|parse}0 sanitizer ignorelist file '%1'">;
```
for two reasons:
1.The `%select` logic is essentially string formatting and can be handled downstream where the error message is constructed.
2.Changing `SpecialCaseList::createInternal` to propagate structured error info adds unnecessary complexity, especially given its general-purpose nature.
https://github.com/llvm/llvm-project/pull/147959
More information about the cfe-commits
mailing list