Skip to content

Commit 8e0ab3c

Browse files
committed
[Clang] Add extra check for lower_bound assert
1 parent 6f7c76d commit 8e0ab3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Basic/Attributes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ getScopeFromNormalizedScopeName(StringRef ScopeName) {
172172
std::begin(ScopeList), std::end(ScopeList), ScopeName,
173173
[](const std::pair<StringRef, AttributeCommonInfo::Scope> &Element,
174174
StringRef Value) { return Element.first < Value; });
175-
assert(It != std::end(ScopeList));
175+
assert(It != std::end(ScopeList) && It->first == ScopeName);
176176

177177
return It->second;
178178
}

0 commit comments

Comments
 (0)