aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Pointer.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2024-10-21 07:51:49 +0200
committerGitHub <noreply@github.com>2024-10-21 07:51:49 +0200
commitdf8b785838a2db01b4d056e603f7317209accefb (patch)
tree00b44a9ca15e8510fdff3fcdbd96001125931cdd /clang/lib/AST/ByteCode/Pointer.cpp
parentd80b9cf713fd1698641c5b265de6b66618991476 (diff)
downloadllvm-df8b785838a2db01b4d056e603f7317209accefb.zip
llvm-df8b785838a2db01b4d056e603f7317209accefb.tar.gz
llvm-df8b785838a2db01b4d056e603f7317209accefb.tar.bz2
[clang][bytecode] Narrow pointer in UO_Deref unary operators (#113089)
Otherwise we treat this like an array element even though we should treat it as a single object.
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r--clang/lib/AST/ByteCode/Pointer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp
index 75b00dc..c9de039 100644
--- a/clang/lib/AST/ByteCode/Pointer.cpp
+++ b/clang/lib/AST/ByteCode/Pointer.cpp
@@ -635,7 +635,7 @@ std::optional<APValue> Pointer::toRValue(const Context &Ctx,
// Return the composite type.
APValue Result;
- if (!Composite(getType(), *this, Result))
+ if (!Composite(ResultType, *this, Result))
return std::nullopt;
return Result;
}