[llvm-branch-commits] [libcxx] 24b3c57 - [libc++] Support no libc++ namespace in the iterator test.

Vladimir Vereschaka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 27 15:10:17 PST 2020


Author: Vladimir Vereschaka
Date: 2020-11-27T15:01:09-08:00
New Revision: 24b3c57adecd0867a2194dfe79643e1f0c962590

URL: https://github.com/llvm/llvm-project/commit/24b3c57adecd0867a2194dfe79643e1f0c962590
DIFF: https://github.com/llvm/llvm-project/commit/24b3c57adecd0867a2194dfe79643e1f0c962590.diff

LOG: [libc++] Support no libc++ namespace in the iterator test.

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.

This patch fixes the test by supporting a test case without __1 in the
namespace.

Differential Revision: https://reviews.llvm.org/D92142

Added: 
    

Modified: 
    libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
index 728909e693cc..2c75fc8aebf9 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp
@@ -67,56 +67,56 @@ int main(int, char**)
 {
     {
     typedef std::iterator_traits<NotAnIteratorEmpty> T;
-    typedef T::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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::
diff erence_type   DT; // expected-error-re {{no type named '
diff erence_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;


        


More information about the llvm-branch-commits mailing list