xref: /llvm-project/clang/test/Sema/pragma-clang-section-macho.c (revision 7f6e3316456f939a062aad0eeaac983251a1747c)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s -triple arm64-apple-ios
2 
3 #pragma clang section bss = "" data = "" rodata = "" text = ""
4 #pragma clang section bss = "" data = "" rodata = "" text = "__TEXT,__text"
5 #pragma clang section bss = "" data = "" rodata = "" text = "badname"                       // expected-error {{argument to #pragma section is not valid for this target: mach-o section specifier requires a segment and section separated by a comma}}
6 #pragma clang section bss = "" data = "" rodata = "" text = "__TEXT,__namethatiswaytoolong" // expected-error {{argument to #pragma section is not valid for this target: mach-o section specifier requires a section whose length is between 1 and 16 characters}}
7 #pragma clang section
8 
9 int a;
10