summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-27 05:24:39 +0000
committerAlp Toker <alp@nuanti.com>2014-01-27 05:24:39 +0000
commit650e286dcf39e58a1e9de767354ff0bda4a9a82e (patch)
treec92f126021d14d376386edc028f794da4813448e /unittests
parent72e501f0be3f92d44f1a10976d56f72ce6f6f8db (diff)
downloadllvm-650e286dcf39e58a1e9de767354ff0bda4a9a82e.tar.gz
llvm-650e286dcf39e58a1e9de767354ff0bda4a9a82e.tar.bz2
llvm-650e286dcf39e58a1e9de767354ff0bda4a9a82e.tar.xz
Roll back the ConstStringRef change for now
There are a couple of interesting things here that we want to check over (particularly the expecting asserts in StringRef) and get right for general use in ADT so hold back on this one. For clang we have a workable templated solution to use in the meanwhile. This reverts commit r200187. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200194 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ADT/StringRefTest.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/unittests/ADT/StringRefTest.cpp b/unittests/ADT/StringRefTest.cpp
index b240a87ef7..0ab8fcf6f0 100644
--- a/unittests/ADT/StringRefTest.cpp
+++ b/unittests/ADT/StringRefTest.cpp
@@ -531,22 +531,4 @@ TEST(StringRefTest, joinStrings) {
EXPECT_TRUE(v2_join3);
}
-static void fn_stringref(StringRef str) {
- EXPECT_TRUE(str == "hello");
-}
-static void fn_conststringref(ConstStringRef str) {
- fn_stringref(str);
-}
-
-TEST(StringRefTest, constStringRef) {
- LLVM_CONSTEXPR ConstStringRef csr("hello");
-#if __has_feature(cxx_constexpr) || defined(__GXX_EXPERIMENTAL_CXX0X__)
- LLVM_STATIC_ASSERT(csr[0] != csr[1], "");
- LLVM_STATIC_ASSERT(csr[2] == csr[3], "");
- LLVM_STATIC_ASSERT(csr.size() == 5, "");
-#endif
- llvm_expect(csr[2] == csr[3]);
- fn_conststringref(csr);
-}
-
} // end anonymous namespace