================
@@ -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();
----------------
AaronBallman wrote:

> so I think using CustomDiagID is better!

Custom diagnostics are not an acceptable solution IMO; the reason is because 
they don't get a warning group associated with them and so users have no way to 
silence those diagnostics. We have some uses of the API in Clang but in every 
case they're the wrong tool to use.

We actually document this on the API itself, but not very clearly: 
https://github.com/llvm/llvm-project/blob/b3e016e05f1d21428298760db82b26fd0266f8bb/clang/include/clang/Basic/Diagnostic.h#L898
 (I'll fix up the comment)

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