================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to