summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/expr/expr.prim
diff options
context:
space:
mode:
authorVlad Tsyrklevich <vtsyrklevich@google.com>2019-10-28 14:36:31 -0700
committerVlad Tsyrklevich <vtsyrklevich@google.com>2019-10-28 15:00:40 -0700
commit38839d08b8e165dfaab0fa6acc77e620d6df294c (patch)
tree34a8a30dc6a8068683a06c767bb49849bad51fbd /clang/test/CXX/expr/expr.prim
parent6b7615ae9a2296f7190b126d7573bfa3310d8afc (diff)
downloadbcm5719-llvm-38839d08b8e165dfaab0fa6acc77e620d6df294c.tar.gz
bcm5719-llvm-38839d08b8e165dfaab0fa6acc77e620d6df294c.zip
Revert "[Concepts] Constraint Enforcement & Diagnostics"
This reverts commit ffa214ef22892d75340dc6720271863901dc2c90, it was causing ASAN test failures on sanitizer-x86_64-linux-bootstrap.
Diffstat (limited to 'clang/test/CXX/expr/expr.prim')
-rw-r--r--clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp b/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
index 1e10d4550ce..dd3f0c0e3d6 100644
--- a/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
+++ b/clang/test/CXX/expr/expr.prim/expr.prim.id/p3.cpp
@@ -72,15 +72,6 @@ template<typename T> struct T2 { static constexpr bool value = sizeof(T) == 2; }
static_assert(IsTypePredicate<T2>);
static_assert(!IsTypePredicate<T1>);
-template<typename T, typename U, typename... Ts>
-concept OneOf = (Same<T, Ts> || ...);
-
-template<typename... X>
-constexpr bool S = OneOf<X..., int, int>;
-
-static_assert(S<int, long, int>);
-static_assert(!S<long, int, char, char>);
-
namespace piecewise_substitution {
template <typename T>
concept True = true;
@@ -156,25 +147,3 @@ template<typename T>
struct X { static constexpr bool a = SameSize<T>; };
static_assert(X<unsigned>::a);
-
-// static_assert concept diagnostics
-template<typename T>
-concept Large = sizeof(T) > 100;
-// expected-note@-1 2{{because 'sizeof(small) > 100' (1 > 100) evaluated to false}}
-
-struct small { };
-static_assert(Large<small>);
-// expected-error@-1 {{static_assert failed}}
-// expected-note@-2 {{because 'small' does not satisfy 'Large'}}
-static_assert(Large<small>, "small isn't large");
-// expected-error@-1 {{static_assert failed "small isn't large"}}
-// expected-note@-2 {{because 'small' does not satisfy 'Large'}}
-
-// Make sure access-checking can fail a concept specialization
-
-class T4 { static constexpr bool f = true; };
-template<typename T> concept AccessPrivate = T{}.f;
-// expected-note@-1{{because substituted constraint expression is ill-formed: 'f' is a private member of 'T4'}}
-static_assert(AccessPrivate<T4>);
-// expected-error@-1{{static_assert failed}}
-// expected-note@-2{{because 'T4' does not satisfy 'AccessPrivate'}}
OpenPOWER on IntegriCloud