[clang] [OpenCLCpp] Avoid inferred adding address-space to function types (PR #153508)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 13 16:31:42 PDT 2025
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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/AST/Type.h clang/include/clang/Sema/SemaOpenCL.h clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaOpenCL.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp clang/lib/Sema/SemaType.cpp clang/test/SemaCXX/friend-template-redecl.cpp clang/test/SemaCXX/friend.cpp clang/test/SemaCXX/friend2.cpp clang/test/SemaCXX/type-traits.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 7f1094d5e..cba71b62b 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -1793,7 +1793,8 @@ bool Sema::CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc) {
}
// Helper to deduce addr space of a pointee type in OpenCL mode.
-static QualType deduceOpenCLPointeeAddrSpace(Sema &S, QualType PointeeType, bool IsBlock) {
+static QualType deduceOpenCLPointeeAddrSpace(Sema &S, QualType PointeeType,
+ bool IsBlock) {
if (!PointeeType->isUndeducedAutoType() && !PointeeType->isDependentType() &&
!PointeeType->isSamplerT() &&
(!PointeeType->isFunctionType() || IsBlock) &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/153508
More information about the cfe-commits
mailing list