[clang] [Clang][RFC] Introduce a trait to determine the structure binding size (PR #131515)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 18 07:03:55 PDT 2025


================
@@ -12102,7 +12102,12 @@ class IntExprEvaluator
   }
 
   bool VisitTypeTraitExpr(const TypeTraitExpr *E) {
-    return Success(E->getValue(), E);
+    if (E->isStoredAsBoolean())
+      return Success(E->getBoolValue(), E);
+    if (E->getAPValue().isAbsent())
+      return false;
+    assert(E->getAPValue().isInt() && "APValue type not supported");
----------------
cor3ntin wrote:

I've added one in the constructor

https://github.com/llvm/llvm-project/pull/131515


More information about the cfe-commits mailing list