[clang] [UBSan] Implement src:*=sanitize for UBSan (PR #140529)

Vitaly Buka via cfe-commits cfe-commits at lists.llvm.org
Mon May 19 15:25:47 PDT 2025


================
@@ -44,6 +44,12 @@ bool NoSanitizeList::containsFunction(SanitizerMask Mask,
 
 bool NoSanitizeList::containsFile(SanitizerMask Mask, StringRef FileName,
                                   StringRef Category) const {
+  unsigned NoSanLine = SSCL->inSectionBlame(Mask, "src", FileName, Category);
----------------
vitalybuka wrote:

inSectionBlame return a single integes, but 
SSCL can be created from multiple ignore list files, you can repeat -fsanitize-ignorelist=

I I think you need to create a separate patch to  change inSectionBlame.
Note, there is llvm-project/llvm/unittests/Support/SpecialCaseListTest.cpp, you can test it there.

https://github.com/llvm/llvm-project/pull/140529


More information about the cfe-commits mailing list