================
@@ -206,23 +221,42 @@ class StdVariantChecker : public Checker<eval::Call, 
check::RegionChanges> {
     if (!ThisMemRegion)
       return;
 
+    // Get the first type alternative of the std::variant instance.
+    assert((ThisSVal.getType(C.getASTContext())->isPointerType() ||
+            ThisSVal.getType(C.getASTContext())->isReferenceType()) &&
----------------
NagyDonat wrote:

Why do we need to allow references here? Is this connected to the freshly 
introduced "explicit object parameter" feature?

https://github.com/llvm/llvm-project/pull/87886
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to