Author: Simon Pilgrim Date: 2021-01-04T15:30:15Z New Revision: e9f401d8a261e747f5dfc9e297f12ab26e56893d
URL: https://github.com/llvm/llvm-project/commit/e9f401d8a261e747f5dfc9e297f12ab26e56893d DIFF: https://github.com/llvm/llvm-project/commit/e9f401d8a261e747f5dfc9e297f12ab26e56893d.diff LOG: [IR] CallBase::getBundleOpInfoForOperand - ensure Current iterator is defined. NFCI. Fix clang static analyzer undefined pointer warning in the case Begin == End. Added: Modified: llvm/lib/IR/Instructions.cpp Removed: ################################################################################ diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 47bf3966bc27..d6b4a4f5030f 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -400,7 +400,7 @@ CallBase::BundleOpInfo &CallBase::getBundleOpInfoForOperand(unsigned OpIdx) { bundle_op_iterator Begin = bundle_op_info_begin(); bundle_op_iterator End = bundle_op_info_end(); - bundle_op_iterator Current; + bundle_op_iterator Current = Begin; while (Begin != End) { unsigned ScaledOperandPerBundle = _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits