================
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional<int>&& 
opt) {
 
   std::forward<absl::optional<int>>(opt).value();
 }
+
+namespace std {
+
+template<typename T>
+class optional {
+public:
+       template <typename U>
+  optional& operator=(const U &u){
+               data = u;
+       }
+private:
+  T data;
+};
+
+template <typename T>
+class vector {
+public:
+  vector() {}
+  T &operator[](unsigned long index) { return data[index]; }
+  bool empty() { return size == 0UL; }
+
+private:
+  T *data;
+  unsigned long size;
+};
+
+} // namespace std
+
+struct LinearGradient {
+  struct Stop {
+    std::optional<float> position;
+  };
+  std::vector<Stop> stops;
+};
+
+
+void use_dyn_cast_or_null() {
----------------
ymand wrote:

Please identify the test case rather than the implementation fix.

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

Reply via email to