================
@@ -20055,6 +20055,46 @@ class VoidExprEvaluator
       // The argument is not evaluated!
       return true;
 
+    case Builtin::BI__builtin_assume_dereferenceable: {
+      assert(E->getType()->isVoidType());
+      assert(E->getNumArgs() == 2);
+
+      APSInt ReqSizeVal;
+      if (!::EvaluateInteger(E->getArg(1), ReqSizeVal, Info))
+        return false;
+      if (ReqSizeVal.isZero())
+        return true;
+
+      LValue Pointer;
+      if (!EvaluatePointer(E->getArg(0), Pointer, Info)) {
+        if (EvaluateBuiltinConstantP(Info, E->getArg(0)))
----------------
chaitanyav wrote:

i wanted to make sure the argument is a constant. I will remove it if it's not 
needed.

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

Reply via email to