[libcxx-commits] [PATCH] D151467: [libc++][NFC] Add additional test case for modules issue in Objective-C++
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 26 12:40:13 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG69f16f75c66e: [libc++][NFC] Add additional test case for modules issue in Objective-C++ (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151467/new/
https://reviews.llvm.org/D151467
Files:
libcxx/test/libcxx/containers/sequences/vector/erase.modules.compile.pass.mm
Index: libcxx/test/libcxx/containers/sequences/vector/erase.modules.compile.pass.mm
===================================================================
--- /dev/null
+++ libcxx/test/libcxx/containers/sequences/vector/erase.modules.compile.pass.mm
@@ -0,0 +1,18 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Make sure that we don't get a compiler error when trying to use std::vector::erase
+// from Objective-C++. This happened in Objective-C++ mode with modules enabled (rdar://106813461).
+
+// REQUIRES: objective-c++
+
+#include <vector>
+
+void f(std::vector<int> vec, std::vector<int>::iterator it) {
+ (void)vec.erase(it);
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151467.526161.patch
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230526/9dd3fb7f/attachment.bin>
More information about the libcxx-commits
mailing list