diff clang/test/SemaCXX/builtins.cpp @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
line wrap: on
line diff
--- a/clang/test/SemaCXX/builtins.cpp	Wed Jul 21 10:27:27 2021 +0900
+++ b/clang/test/SemaCXX/builtins.cpp	Wed Nov 09 17:45:10 2022 +0900
@@ -4,7 +4,11 @@
 #define CFSTR __builtin___CFStringMakeConstantString
 
 void f() {
+#if !defined(__MVS__) && !defined(_AIX)
+  // Builtin function __builtin___CFStringMakeConstantString is currently
+  // unsupported on z/OS and AIX.
   (void)CFStringRef(CFSTR("Hello"));
+#endif
 }
 
 void a() { __builtin_va_list x, y; ::__builtin_va_copy(x, y); }
@@ -39,6 +43,13 @@
   S *ptmp = __builtin_addressof(S{}); // expected-error {{taking the address of a temporary}}
 }
 
+namespace function_start {
+void a(void) {}
+int n;
+void *p = __builtin_function_start(n);               // expected-error {{argument must be a function}}
+static_assert(__builtin_function_start(a) == a, ""); // expected-error {{static assertion expression is not an integral constant expression}}
+} // namespace function_start
+
 void no_ms_builtins() {
   __assume(1); // expected-error {{use of undeclared}}
   __noop(1); // expected-error {{use of undeclared}}
@@ -133,7 +144,7 @@
   Incomplete &i;
 };
 void test_incomplete(Incomplete *i, IncompleteMember *im) {
-  // expected-error@+1 {{incomplete type 'test_launder::Incomplete' where a complete type is required}}
+  // expected-error@+1 {{incomplete type 'Incomplete' where a complete type is required}}
   __builtin_launder(i);
   __builtin_launder(&i); // OK
   __builtin_launder(im); // OK