https://github.com/PiJoules created 
https://github.com/llvm/llvm-project/pull/170723

`hasPointeeToToCFIUncheckedCalleeFunctionType` ->
`hasPointeeToCFIUncheckedCalleeFunctionType`

>From d44a467e63509f718bd287c2420055a39053c49a Mon Sep 17 00:00:00 2001
From: Leonard Chan <[email protected]>
Date: Thu, 4 Dec 2025 19:08:27 +0000
Subject: [PATCH] [NFC][clang] Remove extra `To` in method name

`hasPointeeToToCFIUncheckedCalleeFunctionType` ->
`hasPointeeToCFIUncheckedCalleeFunctionType`
---
 clang/include/clang/AST/TypeBase.h  | 4 ++--
 clang/lib/CodeGen/CGExpr.cpp        | 3 +--
 clang/lib/CodeGen/CGPointerAuth.cpp | 2 +-
 clang/lib/CodeGen/ItaniumCXXABI.cpp | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/clang/include/clang/AST/TypeBase.h 
b/clang/include/clang/AST/TypeBase.h
index f07861f50fe8c..30b9efe5a31b7 100644
--- a/clang/include/clang/AST/TypeBase.h
+++ b/clang/include/clang/AST/TypeBase.h
@@ -2607,7 +2607,7 @@ class alignas(TypeAlignment) Type : public 
ExtQualsTypeCommonBase {
   bool isAnyPointerType() const;   // Any C pointer or ObjC object pointer
   bool isCountAttributedType() const;
   bool isCFIUncheckedCalleeFunctionType() const;
-  bool hasPointeeToToCFIUncheckedCalleeFunctionType() const;
+  bool hasPointeeToCFIUncheckedCalleeFunctionType() const;
   bool isBlockPointerType() const;
   bool isVoidPointerType() const;
   bool isReferenceType() const;
@@ -8564,7 +8564,7 @@ inline bool Type::isCFIUncheckedCalleeFunctionType() 
const {
   return false;
 }
 
-inline bool Type::hasPointeeToToCFIUncheckedCalleeFunctionType() const {
+inline bool Type::hasPointeeToCFIUncheckedCalleeFunctionType() const {
   QualType Pointee;
   if (const auto *PT = getAs<PointerType>())
     Pointee = PT->getPointeeType();
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index e842158236cd4..3bde8e1fa2ac3 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -6601,8 +6601,7 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType,
       FD && 
DeviceKernelAttr::isOpenCLSpelling(FD->getAttr<DeviceKernelAttr>()))
     CGM.getTargetCodeGenInfo().setOCLKernelStubCallingConvention(FnType);
 
-  bool CFIUnchecked =
-      CalleeType->hasPointeeToToCFIUncheckedCalleeFunctionType();
+  bool CFIUnchecked = CalleeType->hasPointeeToCFIUncheckedCalleeFunctionType();
 
   // If we are checking indirect calls and this call is indirect, check that 
the
   // function pointer is a member of the bit set for the function type.
diff --git a/clang/lib/CodeGen/CGPointerAuth.cpp 
b/clang/lib/CodeGen/CGPointerAuth.cpp
index a49a0c91681fe..84b5c86e69a57 100644
--- a/clang/lib/CodeGen/CGPointerAuth.cpp
+++ b/clang/lib/CodeGen/CGPointerAuth.cpp
@@ -530,7 +530,7 @@ llvm::Constant 
*CodeGenModule::getMemberFunctionPointer(llvm::Constant *Pointer,
         cast_or_null<llvm::ConstantInt>(PointerAuth.getDiscriminator()));
 
   if (const auto *MFT = dyn_cast<MemberPointerType>(FT.getTypePtr())) {
-    if (MFT->hasPointeeToToCFIUncheckedCalleeFunctionType())
+    if (MFT->hasPointeeToCFIUncheckedCalleeFunctionType())
       Pointer = llvm::NoCFIValue::get(cast<llvm::GlobalValue>(Pointer));
   }
 
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp 
b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index 65c47633bc5c4..3042f37859e5a 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -709,7 +709,7 @@ CGCallee ItaniumCXXABI::EmitLoadOfMemberFunctionPointer(
       if (BinOp->isPtrMemOp() &&
           BinOp->getRHS()
               ->getType()
-              ->hasPointeeToToCFIUncheckedCalleeFunctionType())
+              ->hasPointeeToCFIUncheckedCalleeFunctionType())
         ShouldEmitCFICheck = false;
     }
   }

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

Reply via email to