================
@@ -16,27 +16,22 @@ APValue FunctionPointer::toAPValue(const ASTContext &) 
const {
     return APValue(static_cast<Expr *>(nullptr), CharUnits::Zero(), {},
                    /*OnePastTheEnd=*/false, /*IsNull=*/true);
 
-  if (!Valid)
-    return APValue(static_cast<Expr *>(nullptr),
-                   CharUnits::fromQuantity(getIntegerRepresentation()), {},
-                   /*OnePastTheEnd=*/false, /*IsNull=*/false);
-
   if (Func->getDecl())
-    return APValue(Func->getDecl(), CharUnits::fromQuantity(Offset), {},
+    return APValue(Func->getDecl(), CharUnits::fromQuantity(0), {},
                    /*OnePastTheEnd=*/false, /*IsNull=*/false);
-  return APValue(Func->getExpr(), CharUnits::fromQuantity(Offset), {},
+  return APValue(Func->getExpr(), CharUnits::fromQuantity(0), {},
                  /*OnePastTheEnd=*/false, /*IsNull=*/false);
 }
 
 void FunctionPointer::print(llvm::raw_ostream &OS) const {
   OS << "FnPtr(";
-  if (Func && Valid)
+  if (Func)
     OS << Func->getName();
   else if (Func)
----------------
shafik wrote:

ping @tbaederr 

https://github.com/llvm/llvm-project/pull/135947
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to