[clang] [CIR] Fix emission of functions referenced by member-pointer (PR #181452)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 13 18:47:29 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp clang/lib/CIR/CodeGen/CIRGenTypes.cpp clang/test/CIR/CodeGen/no-odr-use.cpp clang/test/CIR/CodeGen/pointer-to-member-func-cast.cpp clang/test/CIR/CodeGen/pointer-to-member-func-cmp.cpp clang/test/CIR/CodeGen/pointer-to-member-func.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
index 6a88cda7b..5d6423dc0 100644
--- a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
@@ -547,11 +547,10 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
mlir::Type memberTy = convertType(mpt->getPointeeType());
resultType = cir::DataMemberType::get(memberTy, clsTy);
} else {
- auto memberFuncTy =
- getFunctionType(cgm.getTypes().arrangeCXXMethodType(
- mptNNS.getAsRecordDecl(),
- mpt->getPointeeType()->getAs<clang::FunctionProtoType>(),
- /*methodDecl=*/nullptr));
+ auto memberFuncTy = getFunctionType(cgm.getTypes().arrangeCXXMethodType(
+ mptNNS.getAsRecordDecl(),
+ mpt->getPointeeType()->getAs<clang::FunctionProtoType>(),
+ /*methodDecl=*/nullptr));
resultType = cir::MethodType::get(memberFuncTy, clsTy);
}
break;
``````````
</details>
https://github.com/llvm/llvm-project/pull/181452
More information about the cfe-commits
mailing list