[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 21:06:07 PDT 2026


================
@@ -1447,6 +1451,13 @@ namespace {
     unsigned getLValueCallIndex() const { return Base.getCallIndex(); }
     unsigned getLValueVersion() const { return Base.getVersion(); }
 
+    bool pointsToCompleteClass() const {
+      if (Designator.Entries.empty())
+        return true;
+
----------------
yronglin wrote:

Seems we need to guard that the array element is a complete object?

```cpp
struct V { int n = 7; };
struct D : virtual V {};
constexpr D d[9] = {};
```

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


More information about the cfe-commits mailing list