================
@@ -1219,6 +1219,15 @@ MemRegionManager::getElementRegion(QualType elementType,
NonLoc Idx,
const ASTContext &Ctx) {
QualType T = Ctx.getCanonicalType(elementType).getUnqualifiedType();
+ // The address space must be preserved because some target-specific address
+ // spaces influence the size of the pointer value which is represented by the
+ // element region.
+ if (LangAS AS = elementType.getAddressSpace()) {
----------------
NagyDonat wrote:
```suggestion
LangAS AS = elementType.getAddressSpace();
if (AS != LangAS::Default) {
```
https://github.com/llvm/llvm-project/pull/151370
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits