[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / SemaCXX / cxx1y-sized-deallocation.cpp
blob3ec65a6a64d1ccf786b57d195e297aae5efd2699
1 // RUN: %clang_cc1 -std=c++1y -verify %s -fsized-deallocation -fexceptions -fcxx-exceptions
3 using size_t = decltype(sizeof(0));
4 void operator delete(void *, size_t) noexcept; // expected-note {{'operator delete' declared here}}
5 void operator delete[](void *, size_t) noexcept;
7 void f(void *p, void *q) {
8 // OK, implicitly declared.
9 operator delete(p, 8);
10 operator delete[](q, 12);
11 static_assert(noexcept(operator delete(p, 8)), "");
12 static_assert(noexcept(operator delete[](q, 12)), "");
15 void *operator new(size_t bad, size_t idea);
16 struct S { S() { throw 0; } };
17 void g() {
18 new (123) S; // expected-error {{'new' expression with placement arguments refers to non-placement 'operator delete'}}