Author: Timm Bäder Date: 2023-07-26T11:50:07+02:00 New Revision: e9eb8362f0a580ba8a4cb173b6e8414a6d1a4db4
URL: https://github.com/llvm/llvm-project/commit/e9eb8362f0a580ba8a4cb173b6e8414a6d1a4db4 DIFF: https://github.com/llvm/llvm-project/commit/e9eb8362f0a580ba8a4cb173b6e8414a6d1a4db4.diff LOG: [clang][Interp][NFC] Add an assertion Added: Modified: clang/lib/AST/Interp/InterpBuiltin.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp index e161a0681dcfa4..b29747221ab552 100644 --- a/clang/lib/AST/Interp/InterpBuiltin.cpp +++ b/clang/lib/AST/Interp/InterpBuiltin.cpp @@ -15,6 +15,7 @@ namespace interp { template <typename T> static T getParam(const InterpFrame *Frame, unsigned Index) { + assert(Frame->getFunction()->getNumParams() > Index); unsigned Offset = Frame->getFunction()->getParamOffset(Index); return Frame->getParam<T>(Offset); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits