diff options
author | Richard Smith <richard@metafoo.co.uk> | 2019-12-06 11:34:29 -0800 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2019-12-06 11:35:41 -0800 |
commit | dbd112972416f48f7e5b117e7a14b6e4b4d38146 (patch) | |
tree | 8be2c80c9c59435fb3cdb3316a519cc278c5aa35 /clang/lib | |
parent | 7f63db197e7453a6438c15e50a5508cc7613a293 (diff) | |
download | bcm5719-llvm-dbd112972416f48f7e5b117e7a14b6e4b4d38146.tar.gz bcm5719-llvm-dbd112972416f48f7e5b117e7a14b6e4b4d38146.zip |
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.
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/ComparisonCategories.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/AST/ComparisonCategories.cpp b/clang/lib/AST/ComparisonCategories.cpp index ee4c1b0443a..8999913b728 100644 --- a/clang/lib/AST/ComparisonCategories.cpp +++ b/clang/lib/AST/ComparisonCategories.cpp @@ -190,19 +190,16 @@ ComparisonCategories::getPossibleResultsForType(ComparisonCategoryType Type) { 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); |