[PATCH] D153649: [clang][Interp] Fix return statements with expresssion in void functions
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 26 10:36:21 PDT 2023
shafik added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:312
return this->emitRet(*ReturnType, RS);
+ } else if (RE->getType()->isVoidType()) {
+ if (!this->visit(RE))
----------------
You could also guard the cleanup and `emitRet` above w/ this check, so as to avoid code repetition.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153649/new/
https://reviews.llvm.org/D153649
More information about the cfe-commits
mailing list