[all-commits] [llvm/llvm-project] 753f7e: [OpenCL] Fix an infinite loop in builidng AddrSpac...
Changpeng Fang via All-commits
all-commits at lists.llvm.org
Mon May 20 13:37:23 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 753f7e814514ddb2bb2fd837549d5958cf0ef343
https://github.com/llvm/llvm-project/commit/753f7e814514ddb2bb2fd837549d5958cf0ef343
Author: Changpeng Fang <changpeng.fang at amd.com>
Date: 2024-05-20 (Mon, 20 May 2024)
Changed paths:
M clang/include/clang/AST/ASTContext.h
M clang/lib/AST/ASTContext.cpp
A clang/test/CodeGenOpenCLCXX/array-type-infinite-loop.clcpp
Log Message:
-----------
[OpenCL] Fix an infinite loop in builidng AddrSpaceQualType (#92612)
In building AddrSpaceQualType
(https://github.com/llvm/llvm-project/pull/90048), there is a bug in
removeAddrSpaceQualType() for arrays. Arrays are weird because
qualifiers on the element type also count as qualifiers on the type, so
getSingleStepDesugaredType() can't remove the sugar on arrays. This
results in an infinite loop in removeAddrSpaceQualType. To fix the
issue, we use ASTContext::getUnqualifiedArrayType instead, which strips
the qualifier off the element type, then reconstruct the array type.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list