summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ADT/ArrayRefTest.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2019-01-23 14:20:59 +0000
committerClement Courbet <courbet@google.com>2019-01-23 14:20:59 +0000
commitc7956346dadc003b1563f0398c6fc90dab0b6f93 (patch)
tree1b496cb49c421b7c5c3fd995493c475e9aee3034 /llvm/unittests/ADT/ArrayRefTest.cpp
parent0e08b6f01755a44543809a6847467a17ffd5ee24 (diff)
downloadbcm5719-llvm-c7956346dadc003b1563f0398c6fc90dab0b6f93.tar.gz
bcm5719-llvm-c7956346dadc003b1563f0398c6fc90dab0b6f93.zip
Re-land rL322538 "Add a value_type to ArrayRef."
llvm-svn: 351954
Diffstat (limited to 'llvm/unittests/ADT/ArrayRefTest.cpp')
-rw-r--r--llvm/unittests/ADT/ArrayRefTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/ArrayRefTest.cpp b/llvm/unittests/ADT/ArrayRefTest.cpp
index a5609f89ff9..0407fb41ea5 100644
--- a/llvm/unittests/ADT/ArrayRefTest.cpp
+++ b/llvm/unittests/ADT/ArrayRefTest.cpp
@@ -51,6 +51,14 @@ static_assert(
"Assigning from an initializer list");
#endif
+// Check Typedefs.
+static_assert(
+ std::is_same<ArrayRef<int>::value_type, int>::value,
+ "erroneous value_type");
+static_assert(
+ std::is_same<ArrayRef<const int>::value_type, int>::value,
+ "erroneous value_type");
+
namespace {
TEST(ArrayRefTest, AllocatorCopy) {
OpenPOWER on IntegriCloud