Expect Clang diagnostics in std::launder test

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2018-12-17 16:56:24 +00:00
parent 8f7fa38fb9
commit 2d0643acea

View File

@@ -29,6 +29,8 @@ int main ()
(void) std::launder((const void *) nullptr);
(void) std::launder(( volatile void *) nullptr);
(void) std::launder((const volatile void *) nullptr); // expected-error-re@new:* 4 {{static_assert failed{{.*}} "can't launder cv-void"}}
// expected-error@new:* 4 {{void pointer argument to '__builtin_launder' is not allowed}}
(void) std::launder(foo); // expected-error-re@new:* 1 {{static_assert failed{{.*}} "can't launder functions"}}
// expected-error@new:* {{function pointer argument to '__builtin_launder' is not allowed}}
}