[libcxx-commits] [PATCH] D92142: [libc++] Support no libc++ namespace in the iterator test.
Vlad Vereschaka via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 25 16:02:14 PST 2020
vvereschaka created this revision.
vvereschaka added reviewers: ldionne, phosek.
vvereschaka added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
vvereschaka requested review of this revision.
The `5f12f4ff9078455cad9d4806da01f570553a5bf9` commit suppress printing of inline namespace names in diagnostics by default that breaks the libc++ iterator test, which expects `__1` in the namespace.
See more details here: https://reviews.llvm.org/rG5f12f4ff9078455cad9d4806da01f570553a5bf9
This patch fixes the test by supporting a test case without `__1` in the namespace.
The broken test log for example:
http://lab.llvm.org:8011/#/builders/119/builds/1049/steps/14/logs/FAIL__libc____empty_fail_cpp
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92142
Files:
libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
Index: libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
===================================================================
--- libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
+++ libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
@@ -67,56 +67,56 @@
{
{
typedef std::iterator_traits<NotAnIteratorEmpty> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoDifference> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoValue> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoPointer> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoReference> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
{
typedef std::iterator_traits<NotAnIteratorNoCategory> T;
- typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
- typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std::{{.+}}::iterator_traits<{{.+}}>}}
+ typedef T::difference_type DT; // expected-error-re {{no type named 'difference_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::value_type VT; // expected-error-re {{no type named 'value_type' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::pointer PT; // expected-error-re {{no type named 'pointer' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::reference RT; // expected-error-re {{no type named 'reference' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
+ typedef T::iterator_category CT; // expected-error-re {{no type named 'iterator_category' in 'std{{(::.+)?}}::iterator_traits<{{.+}}>}}
}
return 0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92142.307722.patch
Type: text/x-patch
Size: 8858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201126/375298ae/attachment-0001.bin>
More information about the libcxx-commits
mailing list