Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions clang/include/clang/Basic/SanitizerSpecialCaseList.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ class SanitizerSpecialCaseList : public llvm::SpecialCaseList {
void createSanitizerSections();

struct SanitizerSection {
SanitizerSection(SanitizerMask SM, SectionEntries &E, unsigned idx)
: Mask(SM), Entries(E), FileIdx(idx) {};
SanitizerSection(SanitizerMask SM, const Section &S) : Mask(SM), S(S) {};

SanitizerMask Mask;
SectionEntries &Entries;
unsigned FileIdx;
const Section &S;
};

std::vector<SanitizerSection> SanitizerSections;
Expand Down
8 changes: 4 additions & 4 deletions clang/lib/Basic/SanitizerSpecialCaseList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ SanitizerSpecialCaseList::createOrDie(const std::vector<std::string> &Paths,
}

void SanitizerSpecialCaseList::createSanitizerSections() {
for (auto &S : Sections) {
for (const auto &S : Sections) {
SanitizerMask Mask;

#define SANITIZER(NAME, ID) \
Expand All @@ -50,7 +50,7 @@ void SanitizerSpecialCaseList::createSanitizerSections() {
#undef SANITIZER
#undef SANITIZER_GROUP

SanitizerSections.emplace_back(Mask, S.Entries, S.FileIdx);
SanitizerSections.emplace_back(Mask, S);
}
}

Expand All @@ -67,9 +67,9 @@ SanitizerSpecialCaseList::inSectionBlame(SanitizerMask Mask, StringRef Prefix,
for (const auto &S : llvm::reverse(SanitizerSections)) {
if (S.Mask & Mask) {
unsigned LineNum =
SpecialCaseList::inSectionBlame(S.Entries, Prefix, Query, Category);
SpecialCaseList::inSectionBlame(S.S.Entries, Prefix, Query, Category);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

S.S. is unfortunate naming

if (LineNum > 0)
return {S.FileIdx, LineNum};
return {S.S.FileIdx, LineNum};
}
}
return NotFound;
Expand Down