[clang] [clang][ExprConst] Support virtual bases in C++26 (PR #204289)

Yihan Wang via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 06:59:03 PDT 2026


================
@@ -7186,9 +7301,10 @@ static bool HandleConstructorCall(const Expr *E, const LValue &This,
 
   bool Success = true;
   unsigned BasesSeen = 0;
-#ifndef NDEBUG
-  CXXRecordDecl::base_class_const_iterator BaseIt = RD->bases_begin();
-#endif
+  unsigned VirtualBasesSeen = 0;
+  unsigned NonVirtualBases =
+      llvm::count_if(RD->bases(), [](auto &B) { return !B.isVirtual(); });
----------------
yronglin wrote:

Same as above

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


More information about the cfe-commits mailing list