[clang] [CIR] Add virtual base support to getAddressOfBaseClass (PR #159162)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 29 10:27:45 PDT 2025


================
@@ -865,39 +865,55 @@ Address CIRGenFunction::getAddressOfBaseClass(
     bool nullCheckValue, SourceLocation loc) {
   assert(!path.empty() && "Base path should not be empty!");
 
+  CastExpr::path_const_iterator start = path.begin();
----------------
erichkeane wrote:

I was suggesting perhaps using an iterator-range of some sort instead of keeping the begin/end iterators around.  There is a lot of 'move the start' around business, then we just create a range from it instead (880).  I'm suggesting just storing the range here, and moving it around.

https://github.com/llvm/llvm-project/pull/159162


More information about the cfe-commits mailing list