Stop checking whether std::strong_* has ::equivalent members.
Any attempt to use these would be a bug, so we shouldn't even look for
them.
diff --git a/clang/lib/AST/ComparisonCategories.cpp b/clang/lib/AST/ComparisonCategories.cpp
index ee4c1b0..8999913 100644
--- a/clang/lib/AST/ComparisonCategories.cpp
+++ b/clang/lib/AST/ComparisonCategories.cpp
@@ -190,19 +190,16 @@
using CCT = ComparisonCategoryType;
using CCR = ComparisonCategoryResult;
std::vector<CCR> Values;
- Values.reserve(6);
- Values.push_back(CCR::Equivalent);
+ Values.reserve(4);
bool IsStrong = (Type == CCT::StrongEquality || Type == CCT::StrongOrdering);
if (IsStrong)
- Values.push_back(CCR::Equal);
+ Values.push_back(IsStrong ? CCR::Equal : CCR::Equivalent);
if (Type == CCT::StrongOrdering || Type == CCT::WeakOrdering ||
Type == CCT::PartialOrdering) {
Values.push_back(CCR::Less);
Values.push_back(CCR::Greater);
} else {
- Values.push_back(CCR::Nonequivalent);
- if (IsStrong)
- Values.push_back(CCR::Nonequal);
+ Values.push_back(IsStrong ? CCR::Nonequal : CCR::Nonequivalent);
}
if (Type == CCT::PartialOrdering)
Values.push_back(CCR::Unordered);