xref: /minix3/external/bsd/llvm/dist/clang/test/Lexer/pragma-region.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc /* Test pragma region directive from
2*f4a2713aSLionel Sambuc    http://msdn.microsoft.com/en-us/library/b6xkz944(v=vs.80).aspx */
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // Editor-only pragma, just skipped by compiler.
5*f4a2713aSLionel Sambuc // Syntax:
6*f4a2713aSLionel Sambuc // #pragma region optional name
7*f4a2713aSLionel Sambuc // #pragma endregion optional comment
8*f4a2713aSLionel Sambuc //
9*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify -Wall -fms-extensions %s
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc #pragma region
12*f4a2713aSLionel Sambuc /* inner space */
13*f4a2713aSLionel Sambuc #pragma endregion
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc #pragma region long name
16*f4a2713aSLionel Sambuc /* inner space */
foo(void)17*f4a2713aSLionel Sambuc void foo(void){}
18*f4a2713aSLionel Sambuc #pragma endregion long comment
19*f4a2713aSLionel Sambuc 
20*f4a2713aSLionel Sambuc void inner();
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc __pragma(region) // no sense, but ignored
23*f4a2713aSLionel Sambuc _Pragma("region")// ditto
24*f4a2713aSLionel Sambuc 
25*f4a2713aSLionel Sambuc #pragma region2 // expected-warning {{unknown pragma ignored}}
26*f4a2713aSLionel Sambuc 
27*f4a2713aSLionel Sambuc #pragma region one
28*f4a2713aSLionel Sambuc #pragma region inner
29*f4a2713aSLionel Sambuc //#pragma endregion inner
30*f4a2713aSLionel Sambuc 
31*f4a2713aSLionel Sambuc #pragma endregion end
32*f4a2713aSLionel Sambuc 
33*f4a2713aSLionel Sambuc // {{unclosed pragma region}} - region mismatches is not detected yet
34