[PATCH] D135513: [clang][Interp] Check instance pointers before calling functions on them
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 8 05:47:12 PDT 2022
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, tahonermann.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Remove the double Call() implementation to reduce code duplication.
Then fix Function::getSource() so we can diagnose instance pointers being null.
As discussed in https://reviews.llvm.org/D134699 - this fixes the test case added there.
The output in this case is not 100% the same as the current constant interpreter however.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D135513
Files:
clang/lib/AST/Interp/EvalEmitter.cpp
clang/lib/AST/Interp/Function.cpp
clang/lib/AST/Interp/Interp.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opcodes.td
clang/test/AST/Interp/records.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135513.466279.patch
Type: text/x-patch
Size: 5846 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221008/80978d71/attachment-0001.bin>
More information about the cfe-commits
mailing list