summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Carter <Casey@Carter.net>2017-06-05 19:59:17 +0000
committerCasey Carter <Casey@Carter.net>2017-06-05 19:59:17 +0000
commitc8342f2eef81b959bc81429f9459c816fde5bd32 (patch)
tree552dfec7104d5b655e61136aecfdf4bbd2121624
parent602ee930bf35ccc8095309033033f1daef89257a (diff)
downloadbcm5719-llvm-c8342f2eef81b959bc81429f9459c816fde5bd32.tar.gz
bcm5719-llvm-c8342f2eef81b959bc81429f9459c816fde5bd32.zip
[test] Remove workaround for C1XX empty parameter pack bug
Was VSO#109062. This bug was filed *4 years ago*. I submitted a workaround to enable the scoped_allocator_adaptor tests to pass. Bug fixed a week and a half later. This was either a waste of my time, or I've discovered that libc++ has magical bugfix-inducing powers. My money's on the latter. llvm-svn: 304730
-rw-r--r--libcxx/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp49
-rw-r--r--libcxx/test/support/test_workarounds.h1
-rw-r--r--libcxx/test/support/uses_alloc_types.hpp7
3 files changed, 0 insertions, 57 deletions
diff --git a/libcxx/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp
deleted file mode 100644
index f25a9c9984c..00000000000
--- a/libcxx/test/support/test.workarounds/c1xx_empty_parameter_pack_expansion.pass.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// UNSUPPORTED: c++98, c++03
-
-// Verify TEST_WORKAROUND_C1XX_EMPTY_PARAMETER_PACK_EXPANSION.
-
-#include <type_traits>
-
-#include "test_workarounds.h"
-
-template<class T>
-struct identity {
- using type = T;
-};
-
-template<class...> struct list {};
-
-// C1XX believes this function template is not viable when LArgs is an empty
-// parameter pack.
-template <class ...LArgs>
-int f2(typename identity<LArgs>::type..., int i) {
- return i;
-}
-
-#ifdef TEST_WORKAROUND_C1XX_EMPTY_PARAMETER_PACK_EXPANSION
-// C1XX believes this function template *is* viable when LArgs is an empty
-// parameter pack. Conforming compilers believe the two overloads are
-// ambiguous when LArgs is an empty pack.
-template <class ...LArgs>
-int f2(int i) {
- return i;
-}
-#endif
-
-template <class ...LArgs, class ...Args>
-int f1(list<LArgs...>, Args&&... args) {
- return f2<LArgs const&...>(args...);
-}
-
-int main() {
- f1(list<>{}, 42);
-}
diff --git a/libcxx/test/support/test_workarounds.h b/libcxx/test/support/test_workarounds.h
index ae123d7e41d..e88a14957d3 100644
--- a/libcxx/test/support/test_workarounds.h
+++ b/libcxx/test/support/test_workarounds.h
@@ -19,7 +19,6 @@
#if defined(TEST_COMPILER_C1XX)
# define TEST_WORKAROUND_C1XX_BROKEN_IS_TRIVIALLY_COPYABLE // VSO#117743
-# define TEST_WORKAROUND_C1XX_EMPTY_PARAMETER_PACK_EXPANSION // VSO#109062
# ifndef _MSC_EXTENSIONS
# define TEST_WORKAROUND_C1XX_BROKEN_ZA_CTOR_CHECK // VSO#119998
# endif
diff --git a/libcxx/test/support/uses_alloc_types.hpp b/libcxx/test/support/uses_alloc_types.hpp
index 7f92f0fd19c..426d2583ef8 100644
--- a/libcxx/test/support/uses_alloc_types.hpp
+++ b/libcxx/test/support/uses_alloc_types.hpp
@@ -257,13 +257,6 @@ private:
return alloc;
}
-#ifdef TEST_WORKAROUND_C1XX_EMPTY_PARAMETER_PACK_EXPANSION
- template <class ...LArgs>
- static CtorAlloc getAllocatorFromPackImp(CtorAlloc const& alloc) {
- return alloc;
- }
-#endif
-
bool has_alloc() const { return alloc_store.get_allocator() != nullptr; }
const CtorAlloc *get_alloc() const { return alloc_store.get_allocator(); }
public:
OpenPOWER on IntegriCloud