[flang][cuda] Do not register global constants (#118582)
[llvm-project.git] / clang / test / Parser / while-loop-outside-function.cpp
blob4ba96a959bddccd6803612c11fd2fe82e292b0df
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 while // expected-error {{while loop outside of a function}}
4 (true) {};
6 // without semicolon
7 while // expected-error {{while loop outside of a function}}
8 (true) {}
10 do { // expected-error {{expected unqualified-id}}
11 int some_var = 1;
12 some_var += 3;
14 while // expected-error {{while loop outside of a function}}
15 (true);
17 void someFunction() {
18 while(true) {};
21 class SomeClass {
22 public:
23 while(true) {} // expected-error {{expected member name or ';' after declaration specifiers}}
24 void some_fn() {
25 while(true) {}