[all-commits] [llvm/llvm-project] d53515: [clang][Interp] Fix variadic member functions
Timm Baeder via All-commits
all-commits at lists.llvm.org
Wed Feb 14 21:32:18 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d53515afef57a3abf84daff169fbc7626a306817
https://github.com/llvm/llvm-project/commit/d53515afef57a3abf84daff169fbc7626a306817
Author: Timm Bäder <tbaeder at redhat.com>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M clang/lib/AST/Interp/ByteCodeExprGen.cpp
M clang/lib/AST/Interp/ByteCodeStmtGen.cpp
M clang/lib/AST/Interp/Context.cpp
M clang/lib/AST/Interp/EvalEmitter.cpp
M clang/lib/AST/Interp/Function.h
M clang/lib/AST/Interp/Interp.cpp
M clang/lib/AST/Interp/Interp.h
M clang/lib/AST/Interp/InterpFrame.cpp
M clang/lib/AST/Interp/InterpFrame.h
M clang/lib/AST/Interp/Opcodes.td
M clang/test/AST/Interp/functions.cpp
Log Message:
-----------
[clang][Interp] Fix variadic member functions
For variadic member functions, the way we calculated the instance
pointer and RVO pointer offsts on the stack was incorrect, due
to Func->getArgSize() not returning the full size of all the
passed arguments. When calling variadic functions, we need
to pass the size of the passed (variadic) arguments to the Call*
ops, so they can use that information to properly check the
instance pointer, etc.
This patch adds a bit of code duplication in Interp.h, which I
will get rid of in later cleanup NFC patches.
More information about the All-commits
mailing list