blob: 502db22715a80aad12163d2fd73c452ed5fd5af9 [file] [log] [blame]
Aaron Ballmanfafd1012012-11-30 19:52:30 +00001/* Test pragma region directive from
2 http://msdn.microsoft.com/en-us/library/b6xkz944(v=vs.80).aspx */
3
4// Editor-only pragma, just skipped by compiler.
5// Syntax:
6// #pragma region optional name
7// #pragma endregion optional comment
8//
9// RUN: %clang_cc1 -fsyntax-only -verify -Wall -fms-extensions %s
10
11#pragma region
12/* inner space */
13#pragma endregion
14
15#pragma region long name
16/* inner space */
17void foo(void){}
18#pragma endregion long comment
19
20void inner();
21
22__pragma(region) // no sense, but ignored
23_Pragma("region")// ditto
24
25#pragma region2 // expected-warning {{unknown pragma ignored}}
26
27#pragma region one
28#pragma region inner
29//#pragma endregion inner
30
31#pragma endregion end
32
33// {{unclosed pragma region}} - region mismatches is not detected yet