[llvm] [ADT] Fix llvm::concat_iterator for `ValueT == common_base_class *` (PR #144744)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 09:53:32 PDT 2025


================
@@ -1088,7 +1089,7 @@ class concat_iterator
     if (Begin == End)
       return {};
 
-    if constexpr (ReturnsByValue)
+    if constexpr (ReturnsValueOrPointer)
       return *Begin;
----------------
kuhar wrote:

So this wraps pointers with `std::optional`? Why can't we return pointers here?

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


More information about the llvm-commits mailing list