aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/builtin-functions.cpp
diff options
context:
space:
mode:
authorTimm Bäder <tbaeder@redhat.com>2024-12-03 13:35:57 +0100
committerTimm Bäder <tbaeder@redhat.com>2024-12-03 13:35:57 +0100
commit61c2ac03d85f731d75cda23d1918f03d0cb962dc (patch)
tree2ebdabc99ef77d12ef4a1d69cda0f19f4beaf51c /clang/test/AST/ByteCode/builtin-functions.cpp
parentb2df0074134add80ba3a483a479601b00a9f9fc7 (diff)
downloadllvm-61c2ac03d85f731d75cda23d1918f03d0cb962dc.zip
llvm-61c2ac03d85f731d75cda23d1918f03d0cb962dc.tar.gz
llvm-61c2ac03d85f731d75cda23d1918f03d0cb962dc.tar.bz2
Revert "[clang][bytecode] Handle __builtin_wcslen (#118446)"
This reverts commit 89a0ee89973c3d213c4bc11c26b41eab67e06da0. This breaks builders: https://lab.llvm.org/buildbot/#/builders/13/builds/3885
Diffstat (limited to 'clang/test/AST/ByteCode/builtin-functions.cpp')
-rw-r--r--clang/test/AST/ByteCode/builtin-functions.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/clang/test/AST/ByteCode/builtin-functions.cpp b/clang/test/AST/ByteCode/builtin-functions.cpp
index b951c04..f70b77f 100644
--- a/clang/test/AST/ByteCode/builtin-functions.cpp
+++ b/clang/test/AST/ByteCode/builtin-functions.cpp
@@ -15,10 +15,6 @@
#error "huh?"
#endif
-extern "C" {
- typedef decltype(sizeof(int)) size_t;
- extern size_t wcslen(const wchar_t *p);
-}
namespace strcmp {
constexpr char kFoobar[6] = {'f','o','o','b','a','r'};
@@ -97,14 +93,6 @@ constexpr const char *a = "foo\0quux";
constexpr char d[] = { 'f', 'o', 'o' }; // no nul terminator.
constexpr int bad = __builtin_strlen(d); // both-error {{constant expression}} \
// both-note {{one-past-the-end}}
-
- constexpr int wn = __builtin_wcslen(L"hello");
- static_assert(wn == 5);
- constexpr int wm = wcslen(L"hello"); // both-error {{constant expression}} \
- // both-note {{non-constexpr function 'wcslen' cannot be used in a constant expression}}
-
- int arr[3]; // both-note {{here}}
- int wk = arr[wcslen(L"hello")]; // both-warning {{array index 5}}
}
namespace nan {