================
@@ -1408,6 +1430,32 @@ static bool EvaluateBooleanTypeTrait(Sema &S, TypeTrait 
Kind,
   return false;
 }
 
+static ExprResult
+EvaluateStrongOrderingTypeTrait(Sema &S, TypeTrait Kind, SourceLocation KWLoc,
+                                ArrayRef<TypeSourceInfo *> Args,
+                                SourceLocation RParenLoc, bool IsDependent) {
+  QualType StrongOrdering = S.CheckComparisonCategoryType(
+      ComparisonCategoryType::StrongOrdering, KWLoc,
+      Sema::ComparisonCategoryUsage::Builtin);
+  if (StrongOrdering.isNull())
+    return ExprError();
+
+  if (IsDependent)
+    return TypeTraitExpr::Create(S.Context, StrongOrdering, KWLoc, Kind, Args,
+                                 RParenLoc, APValue());
+
+  switch (Kind) {
+  case clang::BTT_TypeOrder: {
----------------
zwuis wrote:

```cpp
assert(Kind == clang::BTT_TypeOrder && "...")
```

https://github.com/llvm/llvm-project/pull/216462
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to